﻿using System;
using System.IO;
using System.Xml;
using System.Data;
using System.Drawing;
using System.Data.OleDb;
using System.Windows.Forms;
using System.Data.SqlClient;
using WeifenLuo.WinFormsUI.Base;

namespace HRM
{
	/// <summary>
	/// Summary description for Ctrl_General.
	/// </summary>
	public class Ctrl_General
	{
		public Ctrl_General()
		{
			//
			// TODO: Add constructor logic here
			//
		}

		public string GetConnectionString()
		{	// get ConnectionString from config file
			string ls_strXmlPath = Application.StartupPath + @"\config.xml";
			XmlDocument doc = new XmlDocument();
			doc.Load(ls_strXmlPath);
			return doc.DocumentElement.ChildNodes[0].InnerText;
		}

		public SqlConnection GetConnection()
		{
			SqlConnection lConnection  = new SqlConnection(GetConnectionString());
			return lConnection;
		}

		public DataSet GetAllData(out SqlDataAdapter adaUpdate, string asTableName, string asOrderBy)
		{
			try
			{
				DataSet lds = new DataSet();
				SqlConnection lConn = new SqlConnection(GetConnectionString());
				string ls_SQL = "Select * From " + asTableName + asOrderBy;
				adaUpdate = new SqlDataAdapter(ls_SQL, lConn);
				adaUpdate.Fill(lds, asTableName);
				lConn.Close();
				return lds;
			}
			catch (SqlException sqlEx)
			{
				Ctrl_LOG.Print("In Ctrl General", "At GetAllData method", "Sql error message: " + sqlEx.Message);
				adaUpdate = null;
				return null;	
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("In Ctrl General", "At GetAllData method", "Error message: " + ex.Message);
				adaUpdate = null;
				return null;
			}
		}

		public DataSet GetDataWithCondition(out SqlDataAdapter adaUpdate, string asTableName, string asCondition)
		{
			try
			{
				DataSet lds = new DataSet();
				SqlConnection lConn = new SqlConnection(GetConnectionString());
				string ls_SQL = "Select * From " + asTableName 
					+ " Where " + asCondition;
				adaUpdate = new SqlDataAdapter(ls_SQL, lConn);
				adaUpdate.Fill(lds, asTableName);
				lConn.Close();
				return lds;
			}
			catch (SqlException sqlEx)
			{
				Ctrl_LOG.Print("In Ctrl General", "At GetDataWithCondition method", "Sql error message: " + sqlEx.Message);
				adaUpdate = null;
				return null;	
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("In Ctrl General", "At GetDataWithCondition method", "Error message: " + ex.Message);
				adaUpdate = null;
				return null;
			}
		}

		public DataSet GetDataAnyCols(out SqlDataAdapter adaUpdate, string asSQL, string asTableName)
		{
			try
			{
				DataSet lds = new DataSet();
				SqlConnection lConn = new SqlConnection(GetConnectionString());
				adaUpdate = new SqlDataAdapter(asSQL, lConn);
				adaUpdate.Fill(lds, asTableName);
				lConn.Close();
				return lds;
			}
			catch (SqlException sqlEx)
			{
				Ctrl_LOG.Print("In Ctrl General", "At GetDataAnyCols method", "Sql error message: " + sqlEx.Message);
				adaUpdate = null;
				return null;	
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("In Ctrl General", "At GetDataAnyCols method", "Error message: " + ex.Message);
				adaUpdate = null;
				return null;
			}
		}

		public DataSet GetList(string asTableName)
		{
			try
			{
				DataSet lds = new DataSet();
				SqlConnection lConn = new SqlConnection(GetConnectionString());
				string ls_SQL = "Select * From " + asTableName;
				SqlDataAdapter da = new SqlDataAdapter(ls_SQL, lConn);
				da.Fill(lds, asTableName);
				lConn.Close();
				return lds;
			}
			catch (SqlException sqlEx)
			{
				Ctrl_LOG.Print("In Ctrl General", "At GetList method", "Sql error message: " + sqlEx.Message);
				return null;	
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("In Ctrl General", "At GetList method", "Error message: " + ex.Message);
				return null;
			}
		}

		public DataSet GetListWithCondition(string asTableName, string asCondition)
		{
			try
			{
				DataSet lds = new DataSet();
				SqlConnection lConn = new SqlConnection(GetConnectionString());
				string ls_SQL = "Select * From " + asTableName
					+ " Where " + asCondition;
				SqlDataAdapter da = new SqlDataAdapter(ls_SQL, lConn);
				da.Fill(lds, asTableName);
				lConn.Close();
				return lds;
			}
			catch (SqlException sqlEx)
			{
				Ctrl_LOG.Print("In Ctrl General", "At GetListWithCondition method", "Sql error message: " + sqlEx.Message);
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("In Ctrl General", "At GetListWithCondition method", "Error message: " + ex.Message);
				return null;
			}		
		}

		public DataSet GetSelect(string asSQL, string asTableName)
		{
			try
			{
				DataSet lds = new DataSet();
				SqlConnection lConn = new SqlConnection(GetConnectionString());
				string ls_SQL = asSQL;
				SqlDataAdapter da = new SqlDataAdapter(ls_SQL, lConn);
				da.Fill(lds, asTableName);
				lConn.Close();
				return lds;
			}
			catch (SqlException sqlEx)
			{
				Ctrl_LOG.Print("In Ctrl General", "At GetSelect method", "Sql error message: '" + sqlEx.Message+"'");
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("In Ctrl General", "At GetSelect method", "Error message: '"+ex.Message+"'");
				return null;
			}		
		}


		public void GetWorkers(string asSQL, string asTableName, out string aouDepts, out string aouTeams, out string aouTufteds)
		{
			try
			{
				DataSet lds = new DataSet();
				SqlConnection lConn = new SqlConnection(GetConnectionString());
				string ls_SQL = asSQL;
				SqlDataAdapter da = new SqlDataAdapter(ls_SQL, lConn);
				da.Fill(lds, asTableName);
				lConn.Close();
				string lsDepts, lsTeams, lsTufteds;
				lsDepts = lsTeams = lsTufteds = "";
				string lsDeptsTuf, lsTeamsTuf;
				lsDeptsTuf = lsTeamsTuf = "";
				foreach(DataRow dr in lds.Tables[0].Rows)
				{
					if(!dr[2].ToString().Trim().Equals("")) 
					{
						if( lsTufteds.Equals(""))
						{
							lsDeptsTuf = lsDeptsTuf + "'" + dr[0].ToString().Trim() + "'";
							lsTeamsTuf = lsTeamsTuf + "'" + dr[1].ToString().Trim() + "'";
							lsTufteds = lsTufteds + "'" + dr[2].ToString().Trim() + "'";
						}
						else
						{
							lsDeptsTuf = lsDeptsTuf + ", '" + dr[0].ToString().Trim() + "'";
							lsTeamsTuf = lsTeamsTuf + ", '" + dr[1].ToString().Trim() + "'";
							lsTufteds = lsTufteds + ", '" + dr[2].ToString().Trim() + "'";
						}
					}
					else
					{
						if( lsDepts.Equals("") ) // Dept
							if(!dr[0].ToString().Trim().Equals("")) 
								lsDepts = lsDepts + "'" + dr[0].ToString().Trim() + "'";
							else lsDepts += "";
						else 
							if(!dr[0].ToString().Trim().Equals("")) lsDepts = lsDepts + ", '" + dr[0].ToString() + "'";

						if( lsTeams.Equals("") ) // Team
							if(!dr[1].ToString().Trim().Equals("")) 
								lsTeams = lsTeams + "'" + dr[1].ToString().Trim() + "'";
							else lsTeams += "";
						else 
							if(!dr[1].ToString().Trim().Equals("")) lsTeams = lsTeams + ", '" + dr[1].ToString() + "'";
					}
					/*
					if(lsTufteds.Equals("")) // Tufted
						if(!dr[2].ToString().Trim().Equals("")) 
						{
							lsTufteds = lsTufteds + " And PF.ID_Tufted = '" + dr[2].ToString().Trim() + "' ";
						}
						else lsTufteds += "";
					else 
						if(!dr[2].ToString().Trim().Equals("")) lsTufteds = lsTufteds + " And PF.ID_Tufted = '" + dr[2].ToString() + "'";
					*/
				}
				aouDepts = lsDepts; 
				aouTeams = lsTeams;

				aouTufteds = lsTufteds;
			}
			catch (SqlException sqlEx)
			{
				Ctrl_LOG.Print("In Ctrl General", "At GetWorkers method", "Sql error message: '" + sqlEx.Message+"'");
				aouDepts = aouTeams = aouTufteds = "";
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("In Ctrl General", "At GetWorkers method", "Error message: '"+ex.Message+"'");
				aouDepts = aouTeams = aouTufteds = "";
			}		
		}

		public string Update( SqlDataAdapter adaUpdate,DataSet adsUpdate, string asTableNameUpdate, out string as_ColName, out string as_TableName)
		{
			SqlConnection lConnection  = new SqlConnection(GetConnectionString());
			if (adsUpdate == null)	
			{
				as_ColName = "";
				as_TableName = "";
				return asTableNameUpdate + " is empty";
			}
			try
			{
				SqlCommandBuilder cmdUpdate = new SqlCommandBuilder(adaUpdate);
				as_ColName = "";
				as_TableName = "";
				if (adaUpdate.Update(adsUpdate, asTableNameUpdate) >= 0) return "";	
			}
			catch(SqlException ex)
			{
				int li_ErrorNumber	= ex.Number, li_start, li_end;
				string ls_ErrorMsg	= ex.Message;
				as_ColName = "";
				as_TableName = "";

				switch(li_ErrorNumber)
				{
					case 2627:// Duplicate 
						//return "Duplicate " + asTableNameUpdate;
						return "Existed " + asTableNameUpdate.Replace("_", " ")+ ". Please check again!";

					case 1:// Primary key is null
						return " Column is not empty.";

					case 515:// Column is not null
						li_start  = ls_ErrorMsg.IndexOf("'", 0);
						li_end = ls_ErrorMsg.IndexOf("'", li_start + 1);

						as_ColName = ls_ErrorMsg.Substring(li_start + 1, li_end - li_start - 1);
						// return "sqlColumnNotNullMsg";
						return as_ColName.Replace("_"," ") + " cannot be empty. Please check again!";

					case 547:// Violate Constraint
						li_start  = ls_ErrorMsg.IndexOf("table", 0) + 7;
						li_end = ls_ErrorMsg.IndexOf("'", li_start);

						as_TableName = ls_ErrorMsg.Substring(li_start, li_end - li_start);

						li_start  = ls_ErrorMsg.IndexOf("column", 0) + 8;
						li_end = ls_ErrorMsg.IndexOf("'", li_start);
						as_ColName = ls_ErrorMsg.Substring(li_start, li_end - li_start);
						return "Violate Constraint";

					default:
						return "SQLError" + li_ErrorNumber.ToString() + "Msg";
				}			
			}
			catch(Exception ex)
			{
				as_ColName = "";
				as_TableName = "";
				return ex.Message;
			}
			as_ColName = "";
			as_TableName = "";

			return "Database Error: --> Cannot Update "+ asTableNameUpdate;
		}

		public bool myExecuteNonQuery( string asSQL)
		{
			try
			{	
				SqlConnection lConnection  = new SqlConnection(GetConnectionString());
				if(lConnection.State == ConnectionState.Closed) lConnection.Open();
				SqlCommand lcommand = new SqlCommand(asSQL, lConnection);
				lcommand.ExecuteNonQuery();
				lConnection.Close();
				return true;
			}
			catch(SqlException sqlEx)
			{
				Ctrl_LOG.Print("General controller", "In myExecuteNonQuery method.", "Sql error message: '" + sqlEx.Message +"'");
				return false;
			}
		}

		public bool CheckExisted(string asSQL)
		{
			/*
			 - Input: Sql select count(*) command.
			 - Output: boolean value.
			 */
			SqlConnection lConn = new SqlConnection(GetConnectionString());
			try
			{
				if (lConn.State == ConnectionState.Closed) lConn.Open();
				SqlCommand myCommand = new SqlCommand(asSQL, lConn);
				SqlDataReader dataReader = myCommand.ExecuteReader();

				if(dataReader.Read())
				{
					if(dataReader.GetSqlInt32(0).Value == 0)
					{
						myCommand.Dispose();
						dataReader.Close();
						lConn.Close();
						return false;
					}
					else
					{
						myCommand.Dispose();
						dataReader.Close();
						lConn.Close();
						return true;
					}
				}
				myCommand.Dispose();
				dataReader.Close();
				lConn.Close();
				return false;
			}
			catch(SqlException sqlEx)
			{
				Ctrl_LOG.Print("General controller", "In CheckExisted method.", "SQL error message: '" + sqlEx.Message +"'");
				lConn.Close();
				return false;
			}
			catch (Exception ex)
			{
				Ctrl_LOG.Print("General controller", "In CheckExisted method.", "Error message: '" + ex.Message +"'");
				lConn.Close();
				return false;
			}
		}

		public string GetSingleValue(string asSQL)
		{
			/*
			 - Input: Sql select colname command.
			 - Output: string value.
			 */
			SqlConnection lConn = new SqlConnection(GetConnectionString());
			try
			{
				if (lConn.State == ConnectionState.Closed) lConn.Open();
				SqlCommand myCommand = new SqlCommand(asSQL, lConn);
				SqlDataReader dataReader = myCommand.ExecuteReader();

				if(dataReader.Read())
				{
					string lsValue = dataReader.GetSqlValue(0).ToString();
					
					myCommand.Dispose();
					dataReader.Close();
					lConn.Close();
					return lsValue;
				}
				myCommand.Dispose();
				dataReader.Close();
				lConn.Close();
				return "";
			}
			catch(SqlException sqlEx)
			{
				Ctrl_LOG.Print("General controller", "In GetSingleValue method.", "SQL error message: '" + sqlEx.Message +"'");
				lConn.Close();
				return "";
			}
			catch (Exception ex)
			{
				Ctrl_LOG.Print("General controller", "In GetSingleValue method.", "Error message: '" + ex.Message +"'");
				lConn.Close();
				return "";
			}
		}

		public string CheckPeriod(int aiMonth, int aiYear)
		{
			/*
			 - Input: Sql select colname command.
			 - Output: string value.
			 */
			SqlConnection lConn = new SqlConnection(GetConnectionString());
			try
			{
				string ls_SQL = " Select Closed From HRM_Period Where Month(Starting_Date) = " 
					+ aiMonth.ToString() + " And Year(Starting_Date) = " + aiYear.ToString();
				if (lConn.State == ConnectionState.Closed) lConn.Open();
				SqlCommand myCommand = new SqlCommand(ls_SQL, lConn);
				SqlDataReader dataReader = myCommand.ExecuteReader();

				if(dataReader.Read())
				{
					bool lb_Closed = (bool)dataReader.GetSqlBoolean(0);
					
					myCommand.Dispose();
					dataReader.Close();
					lConn.Close();
					if(lb_Closed)
						return "Salary Period is locked. Please check again!";
					else
						return "";
				}
				myCommand.Dispose();
				dataReader.Close();
				lConn.Close();
                return "Salary Period is not create yet. Please check again!";
			}
			catch(SqlException sqlEx)
			{
				Ctrl_LOG.Print("General controller", "In GetSingleValue method.", "SQL error message: '" + sqlEx.Message +"'");
				lConn.Close();
				return "Cannot check period. Sql Error: '" + sqlEx.Message +"'";
			}
			catch (Exception ex)
			{
				Ctrl_LOG.Print("General controller", "In GetSingleValue method.", "Error message: '" + ex.Message +"'");
				lConn.Close();
				return "Cannot check Salary Period. Message Error: '" + ex.Message +"'";
			}
		}

		public string CalculateAdvSal(int aiMonth, int aiYear)
		{
			int li_Status = 0;
			SqlConnection lConn = new SqlConnection(GetConnectionString());
			try
			{
				if (lConn.State == ConnectionState.Closed) lConn.Open();
				SqlCommand myCommand = new SqlCommand("sp3s_Calculate_AdvanceSalary", lConn);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;
				myCommand.CommandTimeout = 30000;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@OUT_Status", SqlDbType.Int, 0, ParameterDirection.Output, false, 0, 0, "", DataRowVersion.Default, null);
				myCommand.Parameters.Add(lparam);

				myCommand.ExecuteNonQuery();
				if (!Convert.IsDBNull(myCommand.Parameters["@OUT_Status"].Value))
					li_Status = (int)myCommand.Parameters["@OUT_Status"].Value;
				lConn.Close();
				myCommand.Dispose();
				switch(li_Status)
				{
					case 1: return "Successful";
					case -2: return "Chưa có nhân viên trong bảng chấm công --> Không thể tính tạm ứng";
				}
					return "UnKnow Error. Please contact Mr Thang";
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("In Controller General", "At CalculateAdvSal method.", "SQL error message: " + ex.Message);
				lConn.Close();
				return "SQLError message:" + ex.Message + "'. Please contact to Mr Thang.";
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("In Controller General", "At CalculateAdvSal method.", "Error message: " + ex.Message);
				lConn.Close();
				return "Error message: '"+ ex.Message +"'. Please contact to Mr Thang.";
			}
		}


		public string CalculateTimeSheet(int aiMonth, int aiYear, string asIDDept, string asIDEmp, string asUser)
		{
			int li_Status = 0;
			SqlConnection lConn = new SqlConnection(GetConnectionString());
			try
			{
				if (lConn.State == ConnectionState.Closed) lConn.Open();
                SqlCommand myCommand = new SqlCommand("sphrm_Calculate_TimeSheet", lConn);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;
				myCommand.CommandTimeout = 30000;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;
				// ID Dept ///////////////////////////////////////////////////
				lparam = new SqlParameter("@IN_IDDept", SqlDbType.VarChar, 20);
				myCommand.Parameters.Add(lparam);
				if(asIDDept.Equals(""))
					myCommand.Parameters["@IN_IDDept"].Value = DBNull.Value;
				else
					myCommand.Parameters["@IN_IDDept"].Value = asIDDept;
				// ID Employee ///////////////////////////////////////////////
                lparam = new SqlParameter("@IN_IDEmp", SqlDbType.VarChar, 20);
				myCommand.Parameters.Add(lparam);
                if (asIDEmp.Equals(""))
                    myCommand.Parameters["@IN_IDEmp"].Value = DBNull.Value;
				else
                    myCommand.Parameters["@IN_IDEmp"].Value = asIDEmp;

				// ID Tufted ///////////////////////////////////////////////////
                lparam = new SqlParameter("@IN_IDUser", SqlDbType.VarChar, 20);
				myCommand.Parameters.Add(lparam);
                if (asUser.Equals(""))
                    myCommand.Parameters["@IN_IDUser"].Value = DBNull.Value;
				else
                    myCommand.Parameters["@IN_IDUser"].Value = asUser;

				lparam = new SqlParameter("@OUT_Status", SqlDbType.Int, 0, ParameterDirection.Output, false, 0, 0, "", DataRowVersion.Default, null);
				myCommand.Parameters.Add(lparam);

				myCommand.ExecuteNonQuery();
				if (!Convert.IsDBNull(myCommand.Parameters["@OUT_Status"].Value))
					li_Status = (int)myCommand.Parameters["@OUT_Status"].Value;
				lConn.Close();
				myCommand.Dispose();
				switch(li_Status)
				{
					case 1: return "Successful";
					case -2: return "Time sheet details is not existed. Please check again!";
				}
				return "UnKnow Error. Please contact Developer";
			}
			catch (SqlException ex)
			{
                Ctrl_LOG.Print("In Controller General", "At CalculateTimeSheet method.", "SQL error message: " + ex.Message);
				lConn.Close();
				return "SQLError message:" + ex.Message + "'. Please contact to Mr Thang.";
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("In Controller General", "At CalculateRemarks method.", "Error message: " + ex.Message);
				lConn.Close();
				return "Error message: '"+ ex.Message +"'. Please contact to Mr Thang.";
			}
		}

		public string CalculatePYAll(int aiMonth, int aiYear)
		{
			int li_Status = 0;
			SqlConnection lConn = new SqlConnection(GetConnectionString());
			try
			{
				if (lConn.State == ConnectionState.Closed) lConn.Open();
				SqlCommand myCommand = new SqlCommand("dbo.sp3s_Calculate_Payroll_All", lConn);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;
				myCommand.CommandTimeout = 30000;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@OUT_Status", SqlDbType.Int, 0, ParameterDirection.Output, false, 0, 0, "", DataRowVersion.Default, null);
				myCommand.Parameters.Add(lparam);

				myCommand.ExecuteNonQuery();
				if (!Convert.IsDBNull(myCommand.Parameters["@OUT_Status"].Value))
					li_Status = (int)myCommand.Parameters["@OUT_Status"].Value;
				lConn.Close();
				myCommand.Dispose();
				switch(li_Status)
				{
					case 1: return "Successful";
					case -1: return "Chưa khai báo số ngày làm việc trong tháng theo qui định của công ty. Vui lòng kiểm tra lại!";
					case -2: return "Bảng Chấm Công chưa có dữ liệu --> Không thể tính lương được. Vui lòng kiểm tra lại!";
					case -3: return "Chưa khai báo số giờ làm việc trong ngày theo qui định của công ty. Vui lòng kiểm tra lại!";
				}
				return "Lỗi chưa xác định. Vui lòng liên lạc với nhân viên phần mềm";
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("In Controller General", "At CalculatePYAll method.", "SQL error message: " + ex.Message);
				lConn.Close();
				return "SQLError message: '" + ex.Message + "'. Vui lòng liên lạc với nhân viên phần mềm.";
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("In Controller General", "At CalculatePYAll method.", "Error message: " + ex.Message);
				lConn.Close();
				return "Error message: '"+ ex.Message +"'. Please contact to Mr Thang.";
			}
		}

		public string CalculatePYDept(int aiMonth, int aiYear, string asDept, int aiTypeEmp)
		{
			int li_Status = 0;
			SqlConnection lConn = new SqlConnection(GetConnectionString());
			try
			{
				if (lConn.State == ConnectionState.Closed) lConn.Open();
				SqlCommand myCommand = new SqlCommand("sp3s_Calculate_Payroll_Dept", lConn);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;
				myCommand.CommandTimeout = 30000;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@IN_Depts", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Depts"].Value = asDept;

				lparam = new SqlParameter("@IN_Type_Emp", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Type_Emp"].Value = aiTypeEmp;

				lparam = new SqlParameter("@OUT_Status", SqlDbType.Int, 0, ParameterDirection.Output, false, 0, 0, "", DataRowVersion.Default, null);
				myCommand.Parameters.Add(lparam);

				myCommand.ExecuteNonQuery();
				if (!Convert.IsDBNull(myCommand.Parameters["@OUT_Status"].Value))
					li_Status = (int)myCommand.Parameters["@OUT_Status"].Value;
				lConn.Close();
				myCommand.Dispose();
				switch(li_Status)
				{
					case 1: return "Successful";
					case -1: return "Chưa khai báo số ngày làm việc trong tháng theo qui định công ty. Vui lòng kiểm tra lại!";
					case -2: return "Bảng Chấm Công chưa có dữ liệu --> Không thể tính lương được. Vui lòng kiểm tra lại!";
					case -3: return "Chưa khai báo số giờ làm việc trong ngày theo qui định công ty. Vui lòng kiểm tra lại!";
				}
				return "Lỗi chưa xác định. Vui lòng liên hệ với nhân viên phần mềm!";
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("In Controller General", "At CalculatePYDept method.", "SQL error message: " + ex.Message);
				lConn.Close();
				return "Lỗi dữ liệu: '" + ex.Message + "'. Vui lòng liên hệ với nhân viên phần mềm!";
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("In Controller General", "At CalculatePYDept method.", "Error message: " + ex.Message);
				lConn.Close();
				return "Lỗi: '"+ ex.Message +"'. Vui lòng liên hệ với nhân viên phần mềm!";
			}
		}

		public string CalculatePYTeam(int aiMonth, int aiYear, string asTeam, int aiTypeEmp)
		{
			int li_Status = 0;
			SqlConnection lConn = new SqlConnection(GetConnectionString());
			try
			{
				if (lConn.State == ConnectionState.Closed) lConn.Open();
				SqlCommand myCommand = new SqlCommand("sp3s_Calculate_Payroll_Team", lConn);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;
				myCommand.CommandTimeout = 30000;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@IN_Teams", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Teams"].Value = asTeam;

				lparam = new SqlParameter("@IN_Type_Emp", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Type_Emp"].Value = aiTypeEmp;

				lparam = new SqlParameter("@OUT_Status", SqlDbType.Int, 0, ParameterDirection.Output, false, 0, 0, "", DataRowVersion.Default, null);
				myCommand.Parameters.Add(lparam);

				myCommand.ExecuteNonQuery();
				if (!Convert.IsDBNull(myCommand.Parameters["@OUT_Status"].Value))
					li_Status = (int)myCommand.Parameters["@OUT_Status"].Value;
				lConn.Close();
				myCommand.Dispose();
				switch(li_Status)
				{
					case 1: return "Successful";
					case -1: return "Chưa khai báo số ngày làm việc trong tháng theo qui định của công ty. Vui lòng kiểm tra lại!";
					case -2: return "Bảng Chấm Công chưa có dữ liệu --> Không thể tính lương được. Vui lòng kiểm tra lại!";
					case -3: return "Chưa khai báo số giờ làm việc trong ngày theo qui định công ty. Vui lòng kiểm tra lại!";
				}
				return "Lỗi chưa xác định. Vui lòng liên hệ với nhân viên phần mềm!";
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("In Controller General", "At CalculatePYTeam method.", "SQL error message: " + ex.Message);
				lConn.Close();
				return "Lỗi dữ liệu: '" + ex.Message + "'. Vui lòng liên hệ với nhân viên phần mềm!";
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("In Controller General", "At CalculatePYTeam method.", "Error message: " + ex.Message);
				lConn.Close();
				return "Lỗi: '"+ ex.Message +"'. Vui lòng liên hệ với nhân viên phần mềm!";
			}
		}


		public string CalculatePYTufted(int aiMonth, int aiYear, string asTufted, int aiTypeEmp)
		{
			int li_Status = 0;
			SqlConnection lConn = new SqlConnection(GetConnectionString());
			try
			{
				if (lConn.State == ConnectionState.Closed) lConn.Open();
				SqlCommand myCommand = new SqlCommand("sp3s_Calculate_Payroll_Tufted", lConn);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;
				myCommand.CommandTimeout = 30000;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@IN_Tufted", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Tufted"].Value = asTufted;

				lparam = new SqlParameter("@IN_Type_Emp", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Type_Emp"].Value = aiTypeEmp;

				lparam = new SqlParameter("@OUT_Status", SqlDbType.Int, 0, ParameterDirection.Output, false, 0, 0, "", DataRowVersion.Default, null);
				myCommand.Parameters.Add(lparam);

				myCommand.ExecuteNonQuery();
				if (!Convert.IsDBNull(myCommand.Parameters["@OUT_Status"].Value))
					li_Status = (int)myCommand.Parameters["@OUT_Status"].Value;
				lConn.Close();
				myCommand.Dispose();
				switch(li_Status)
				{
					case 1: return "Successful";
					case -1: return "Chưa khai báo số ngày làm việc trong tháng theo qui định của công ty. Vui lòng kiểm tra lại!";
					case -2: return "Bảng Chấm Công chưa có dữ liệu --> Không thể tính lương được. Vui lòng kiểm tra lại!";
					case -3: return "Chưa khai báo số giờ làm việc trong ngày theo qui định công ty. Vui lòng kiểm tra lại!";
				}
				return "Lỗi chưa xác định. Vui lòng liên hệ với nhân viên phần mềm!";
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("In Controller General", "At CalculatePYTufted method.", "SQL error message: " + ex.Message);
				lConn.Close();
				return "Lỗi dữ liệu: '" + ex.Message + "'. Vui lòng liên hệ với nhân viên phần mềm!";
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("In Controller General", "At CalculatePYTufted method.", "Error message: " + ex.Message);
				lConn.Close();
				return "Lỗi: '"+ ex.Message +"'. Vui lòng liên hệ với nhân viên phần mềm!";
			}
		}

		public string CalculatePY(int aiMonth, int aiYear, string asDept, string asEmployee, string asUser)
		{
			int li_Status = 0;
			SqlConnection lConn = new SqlConnection(GetConnectionString());
			try
			{
				if (lConn.State == ConnectionState.Closed) lConn.Open();
                SqlCommand myCommand = new SqlCommand("sphrm_Calculate_Payroll", lConn);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;
				myCommand.CommandTimeout = 30000;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

                lparam = new SqlParameter("@IN_Dept", SqlDbType.VarChar, 20);
                myCommand.Parameters.Add(lparam);
                myCommand.Parameters["@IN_Dept"].Value = (string.IsNullOrEmpty(asDept) ? (object)DBNull.Value : (object)asDept);

                lparam = new SqlParameter("@IN_IDEmp", SqlDbType.VarChar, 20);
				myCommand.Parameters.Add(lparam);
                myCommand.Parameters["@IN_IDEmp"].Value = (string.IsNullOrEmpty(asEmployee) ? (object)DBNull.Value : (object)asEmployee);

                lparam = new SqlParameter("@IN_IDUser", SqlDbType.VarChar, 20);
				myCommand.Parameters.Add(lparam);
                myCommand.Parameters["@IN_IDUser"].Value = (string.IsNullOrEmpty(asUser) ? (object)DBNull.Value : (object)asUser);

				lparam = new SqlParameter("@OUT_Status", SqlDbType.Int, 0, ParameterDirection.Output, false, 0, 0, "", DataRowVersion.Default, null);
				myCommand.Parameters.Add(lparam);

				myCommand.ExecuteNonQuery();
				if (!Convert.IsDBNull(myCommand.Parameters["@OUT_Status"].Value))
					li_Status = (int)myCommand.Parameters["@OUT_Status"].Value;
				lConn.Close();
				myCommand.Dispose();
				switch(li_Status)
				{
					case 1: return "Successful";
					case -1: return "Chưa khai báo số ngày làm việc trong tháng theo qui định công ty. Vui lòng kiểm tra lại!";
					case -2: return "Time sheet is not existed. Please check again!";
					case -3: return "Chưa khai báo số giờ làm việc trong ngày theo qui định công ty. Vui lòng kiểm tra lại!";
					case -4: return "Nhân viên này không thuộc diện tính lương hay không tồn tại. Vui lòng kiểm tra lại trong 'Hồ Sơ Nhân Sự'!";
				}
				return "Lỗi chưa xác định. Vui lòng liên hệ với nhân viên phần mềm!";
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("In Controller General", "At CalculatePYEmployee method.", "SQL error message: " + ex.Message);
				lConn.Close();
				return "Error: '" + ex.Message + "'. Vui lòng liên hệ với nhân viên phần mềm!";
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("In Controller General", "At CalculatePYEmployee method.", "Error message: " + ex.Message);
				lConn.Close();
				return "Lỗi: '"+ ex.Message +"'. Vui lòng liên hệ với nhân viên phần mềm!";
			}
		}

		public string CalculatePYTypeEmp( int aiMonth, int aiYear, int aiTypeEmp)
		{
			int li_Status = 0;
			SqlConnection lConn = new SqlConnection(GetConnectionString());
			try
			{
				if (lConn.State == ConnectionState.Closed) lConn.Open();
				SqlCommand myCommand = new SqlCommand("sp3s_Calculate_Payroll_TypeEmp", lConn);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;
				myCommand.CommandTimeout = 30000;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@IN_Type_Emp", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Type_Emp"].Value = aiTypeEmp;

				lparam = new SqlParameter("@OUT_Status", SqlDbType.Int, 0, ParameterDirection.Output, false, 0, 0, "", DataRowVersion.Default, null);
				myCommand.Parameters.Add(lparam);

				myCommand.ExecuteNonQuery();
				if (!Convert.IsDBNull(myCommand.Parameters["@OUT_Status"].Value))
					li_Status = (int)myCommand.Parameters["@OUT_Status"].Value;
				lConn.Close();
				myCommand.Dispose();
				switch(li_Status)
				{
					case 1: return "Successful";
					case -1: return "Chưa khai báo số ngày làm việc trong tháng theo qui định công ty. Vui lòng kiểm tra lại!";
					case -2: return "Bảng Chấm Công chưa có dữ liệu --> Không thể tính lương được. Vui lòng kiểm tra lại!";
					case -3: return "Chưa khai báo số giờ làm việc theo qui định công ty. Vui lòng kiểm tra lại!";
				}
				return "Lỗi chưa xác định. Vui lòng liên hệ nhân viên phần mềm!";
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("In Controller General", "At CalculatePYTypeEmp method.", "SQL error message: " + ex.Message);
				lConn.Close();
				return "Lỗi dữ liệu: '" + ex.Message + "'. Vui lòng liên hệ nhân viên phần mềm!";
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("In Controller General", "At CalculatePYTypeEmp method.", "Error message: " + ex.Message);
				lConn.Close();
				return "Lỗi: '"+ ex.Message +"'. Vui lòng liên hệ nhân viên phần mềm!";
			}
		}
		public string UpdateEmployee(int aiMonth, int aiYear)
		{
			int li_Status = 0;
			SqlConnection lConn = new SqlConnection(GetConnectionString());
			try
			{
				if (lConn.State == ConnectionState.Closed) lConn.Open();
				SqlCommand myCommand = new SqlCommand("sp3s_Update_Employee_Movement", lConn);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;
				myCommand.CommandTimeout = 30000;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@OUT_Status", SqlDbType.Int, 0, ParameterDirection.Output, false, 0, 0, "", DataRowVersion.Default, null);
				myCommand.Parameters.Add(lparam);

				myCommand.ExecuteNonQuery();
				if (!Convert.IsDBNull(myCommand.Parameters["@OUT_Status"].Value))
					li_Status = (int)myCommand.Parameters["@OUT_Status"].Value;
				lConn.Close();
				myCommand.Dispose();
				switch(li_Status)
				{
					case 1: return "Successful";
					case -1: return "Not data in movement --> Cannot update employee";
				}
				return "UnKnow Error. Please contact Mr Trung";
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("In Controller General", "At UpdateEmployee method.", "SQL error message: " + ex.Message);
				lConn.Close();
				return "SQLError message: '" + ex.Message + "'. Please contact to Mr Trung.";
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("In Controller General", "At UpdateEmployee method.", "Error message: " + ex.Message);
				lConn.Close();
				return "Error message: '"+ ex.Message +"'. Please contact to Mr Thang.";
			}
		}
		public string UpdateEmpPABasicPay(int aiMonth, int aiYear)
		{
			int li_Status = 0;
			SqlConnection lConn = new SqlConnection(GetConnectionString());
			try
			{
				if (lConn.State == ConnectionState.Closed) lConn.Open();
				SqlCommand myCommand = new SqlCommand("sp3s_Update_To_Employee_PA_BasicPay", lConn);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;
				myCommand.CommandTimeout = 30000;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@OUT_Status", SqlDbType.Int, 0, ParameterDirection.Output, false, 0, 0, "", DataRowVersion.Default, null);
				myCommand.Parameters.Add(lparam);

				myCommand.ExecuteNonQuery();
				if (!Convert.IsDBNull(myCommand.Parameters["@OUT_Status"].Value))
					li_Status = (int)myCommand.Parameters["@OUT_Status"].Value;
				lConn.Close();
				myCommand.Dispose();
				switch(li_Status)
				{
					case 1: return "Successful";
					case -1: return "Not data in basic pay --> Cannot update employee";
				}
				return "UnKnow Error. Please contact Mr Trung";
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("In Controller General", "At UpdateEmpPABasicPay method.", "SQL error message: " + ex.Message);
				lConn.Close();
				return "SQLError message: '" + ex.Message + "'. Please contact to Mr Trung.";
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("In Controller General", "At UpdateEmpPABasicPay method.", "Error message: " + ex.Message);
				lConn.Close();
				return "Error message: '"+ ex.Message +"'. Please contact to Mr Thang.";
			}
		}

		public string UpdateEmpPABasic(int aiMonth, int aiYear)
		{
            
            int li_Status = 0;
			SqlConnection lConn = new SqlConnection(GetConnectionString());
			try
			{
				if (lConn.State == ConnectionState.Closed) lConn.Open();
				SqlCommand myCommand = new SqlCommand("sp3s_Update_To_Employee_PA_Basic", lConn);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;
				myCommand.CommandTimeout = 30000;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@OUT_Status", SqlDbType.Int, 0, ParameterDirection.Output, false, 0, 0, "", DataRowVersion.Default, null);
				myCommand.Parameters.Add(lparam);

				myCommand.ExecuteNonQuery();
				if (!Convert.IsDBNull(myCommand.Parameters["@OUT_Status"].Value))
					li_Status = (int)myCommand.Parameters["@OUT_Status"].Value;
				lConn.Close();
				myCommand.Dispose();
				switch(li_Status)
				{
					case 1: return "Successful";
					case -1: return "Not data in basic --> Cannot update employee";
				}
				return "UnKnow Error. Please contact Mr Trung";
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("In Controller General", "At UpdateEmpPABasic method.", "SQL error message: " + ex.Message);
				lConn.Close();
				return "SQLError message: '" + ex.Message + "'. Please contact to Mr Trung.";
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("In Controller General", "At UpdateEmpPABasic method.", "Error message: " + ex.Message);
				lConn.Close();
				return "Error message: '"+ ex.Message +"'. Please contact to Mr Thang.";
			}
		}

        public bool GetPathOpenFileDlg(out string aFilePath)
        {
            try
            {
                OpenFileDialog openFileDialog = new OpenFileDialog();
                //openFileDialog.InitialDirectory = Application.StartupPath;
                openFileDialog.Filter = "Excel files 2007 - 2010 (*.xlsx)|*.xlsx|Excel files 1997 - 2003 (*.xls)|*.xls|All files (*.*)|*.*";
                openFileDialog.FilterIndex = 0;
                openFileDialog.RestoreDirectory = true;
                if (openFileDialog.ShowDialog() == DialogResult.OK)
                {
                    aFilePath = openFileDialog.FileName;
                    return true;
                }
                else
                {
                    aFilePath = "";
                    return true;
                }
            }
            catch (Exception ex)
            {
                aFilePath = ex.Message;
                Ctrl_LOG.Print("In Controller General", "At GetPathOpenFileDlg method.", "Error message: " + ex.Message);
                return false;
            }
        }

        #region GetDataReports ...
        public DataSet GetDataReportPaymentMeals(string asMeals,string asTeam,string asTufted, int aiMonth, int aiYear)
		{
            return null;
            /*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Meal_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@IN_ID_Department", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asMeals.Equals(""))
					myCommand.Parameters["@IN_ID_Department"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Department"].Value = asMeals;

				lparam = new SqlParameter("@IN_ID_Team", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTeam.Equals(""))
					myCommand.Parameters["@IN_ID_Team"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Team"].Value = asTeam;

				lparam = new SqlParameter("@IN_ID_Tufted", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTufted.Equals(""))
					myCommand.Parameters["@IN_ID_Tufted"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Tufted"].Value = asTufted;

				dtsMeals ldsMeals = new dtsMeals();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsMeals.tbMeals);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsMeals.EnforceConstraints = false;
				SetLogo(ldsMeals.tbLogo);
				return ldsMeals;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong PaymentMealsReport.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong PaymentMealsReport.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportHumanResourceList(string asDepart, string asTeam,string asTufted,int aiMonth, int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_HumanResource_List_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@IN_@IDDepartment", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asDepart.Equals(""))
					myCommand.Parameters["@IN_@IDDepartment"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_@IDDepartment"].Value = asDepart;

				lparam = new SqlParameter("@IN_@IDTeam", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTeam.Equals(""))
					myCommand.Parameters["@IN_@IDTeam"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_@IDTeam"].Value = asTeam;

				lparam = new SqlParameter("@IN_@IDTufted", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTufted.Equals(""))
					myCommand.Parameters["@IN_@IDTufted"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_@IDTufted"].Value = asTufted;
				
				dtsHumanResourceList ldsHRL = new dtsHumanResourceList();
				ldsHRL.EnforceConstraints = false;
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsHRL.HumanResource_List);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				//ldsHRL.EnforceConstraints = false
				SetLogo(ldsHRL.tbLogo);
				return ldsHRL;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Danh Sách Nhân Sự'.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Danh Sách Nhân Sự'.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
        public DataSet GetDataReportHumanResourceListQuality(string asDepart, string asTeam,string asTufted,int aiMonth, int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_HumanResourceList_Quality_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@IN_IDDepartment", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asDepart.Equals(""))
					myCommand.Parameters["@IN_IDDepartment"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_IDDepartment"].Value = asDepart;

				lparam = new SqlParameter("@IN_IDTeam", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTeam.Equals(""))
					myCommand.Parameters["@IN_IDTeam"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_IDTeam"].Value = asTeam;

				lparam = new SqlParameter("@IN_IDTufted", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTufted.Equals(""))
					myCommand.Parameters["@IN_IDTufted"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_IDTufted"].Value = asTufted;
				
				dtsHumanResourceListQuality ldsHRQ = new dtsHumanResourceListQuality();
				ldsHRQ.EnforceConstraints = false;
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsHRQ.tbHumanResourceListQuality);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				//ldsHRL.EnforceConstraints = false;
				SetLogo(ldsHRQ.tbLogo);
				return ldsHRQ;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Danh Sách Nhân Sự Các Bộ Phận'.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Danh Sách Nhân Sự Các Bộ Phận'.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportTotalMeals( int aiMonth, int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Meal_Total_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				dtsTotalMeals ldsTMeals = new dtsTotalMeals();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsTMeals.tbTotalMeals);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsTMeals.EnforceConstraints = false;
				SetLogo(ldsTMeals.tbLogo)  ;
				return ldsTMeals;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Tổng hợp tiền cơm'.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Tổng hợp tiền cơm'.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportHumanResourceGeneral( int aiMonth, int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_TotalHR_General_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				
				dtsHumanResourceGeneral ldsHRG = new dtsHumanResourceGeneral();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsHRG.tbHumanResourceGeneral);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsHRG.EnforceConstraints = false;
				SetLogo(ldsHRG.tbLogo);
				return ldsHRG;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Báo cáo tổng hợp nhân sự'.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Báo cáo tổng hợp nhân sự'.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportSalaryEmployeeTotalIndirect( int aiMonth, int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Salary_Employee_Total_Indirect_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				dtsSalaryEmployeeTotalIndirect ldsSalaryETI = new dtsSalaryEmployeeTotalIndirect();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsSalaryETI.tbSalaryEmployeeTotalIndirect);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsSalaryETI.EnforceConstraints = false;
				SetLogo(ldsSalaryETI.tbLogo);
				return ldsSalaryETI;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Bảng Tổng Hợp Lương Khối Gián Tiếp'.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Bảng Tổng Hợp Lương Khối Gián Tiếp'.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportSalaryManagementTotal( int aiMonth, int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Salary_Management_Total_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				dtsSalaryManagementTotal ldsSalaryMT = new dtsSalaryManagementTotal();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsSalaryMT.tbSalaryManagementTotal);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsSalaryMT.EnforceConstraints = false;
				SetLogo(ldsSalaryMT.tbLogo);
				return ldsSalaryMT;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Bảng Tổng Hợp Lương Ban Điều Hành'.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Bảng Tổng Hợp Lương Ban Điều Hành'.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportTotalAdvanceSalary( int aiMonth, int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Advance_TotalSalary_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				dtsAdvanceTotalSalary ldsTotalAdvanceSalary = new dtsAdvanceTotalSalary();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsTotalAdvanceSalary.tbAdvanceTotalSalary);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsTotalAdvanceSalary.EnforceConstraints = false;
				SetLogo(ldsTotalAdvanceSalary.tbLogo);
				return ldsTotalAdvanceSalary;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Bảng Tổng Hợp Tiền Tạm Ứng'.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Bảng Tổng Hợp Tiền Tạm Ứng'.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportRemark( string asDepartment,string asTeam,string asTufted, string asEmployee ,int aiMonth, int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Table_Remark_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@IN_ID_Department", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asDepartment.Equals(""))
					myCommand.Parameters["@IN_ID_Department"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Department"].Value = asDepartment;

				lparam = new SqlParameter("@IN_ID_Team", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTeam.Equals(""))
					myCommand.Parameters["@IN_ID_Team"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Team"].Value = asTeam;

				lparam = new SqlParameter("@IN_ID_Tufted", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTufted.Equals(""))
					myCommand.Parameters["@IN_ID_Tufted"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Tufted"].Value = asTufted;

				lparam = new SqlParameter("@IN_ID_Employee", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asEmployee.Equals(""))
					myCommand.Parameters["@IN_ID_Employee"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Employee"].Value = asEmployee;

				dtsTableRemark ldsTRemark = new dtsTableRemark();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				ldsTRemark.EnforceConstraints = false;
				adap.Fill(ldsTRemark.tbTableRemark);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				SetLogo(ldsTRemark.tbLogo);
				//ldsTRemark.EnforceConstraints = false;
				return ldsTRemark;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Bảng Điểm'.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Bảng Điểm'.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportRemarkDetail( string asDepartment,string asTeam,string asTufted, string asEmployee ,int aiMonth, int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Table_Remark_Detail_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@IN_ID_Department", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asDepartment.Equals(""))
					myCommand.Parameters["@IN_ID_Department"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Department"].Value = asDepartment;

				lparam = new SqlParameter("@IN_ID_Team", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTeam.Equals(""))
					myCommand.Parameters["@IN_ID_Team"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Team"].Value = asTeam;

				lparam = new SqlParameter("@IN_ID_Tufted", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTufted.Equals(""))
					myCommand.Parameters["@IN_ID_Tufted"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Tufted"].Value = asTufted;

				lparam = new SqlParameter("@IN_ID_Employee", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asEmployee.Equals(""))
					myCommand.Parameters["@IN_ID_Employee"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Employee"].Value = asEmployee;

				dtsRemarkDetail ldsRemarkDetail = new dtsRemarkDetail();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				ldsRemarkDetail.EnforceConstraints = false;
				adap.Fill(ldsRemarkDetail.tbTableRemarkDetail);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				//ldsTRemark.EnforceConstraints = false;
				SetLogo(ldsRemarkDetail.tbLogo);
				return ldsRemarkDetail;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Bảng Điểm Chi Tiết'.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Bảng Điểm Chi Tiết'.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportSocialInsuranceSick( string asDepartment,string asTeam ,string asTufted,int aiMonth, int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Social_Insurance_Sick_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@IN_ID_Department", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asDepartment.Equals(""))
					myCommand.Parameters["@IN_ID_Department"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Department"].Value = asDepartment;

				lparam = new SqlParameter("@IN_ID_Team", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTeam.Equals(""))
					myCommand.Parameters["@IN_ID_Team"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Team"].Value = asTeam;
				
				lparam = new SqlParameter("@IN_ID_Tufted", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTufted.Equals(""))
					myCommand.Parameters["@IN_ID_Tufted"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Tufted"].Value = asTufted;
				
				dtsConvalescence ldsConvalescence = new dtsConvalescence();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				ldsConvalescence.EnforceConstraints = false;
				adap.Fill(ldsConvalescence, "tmp_SOCIAL_INSURANCE_SICK");
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				
				return ldsConvalescence;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Danh Sách Nhân Viên Nghỉ Dưỡng Sức'.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Danh Sách Nhân Viên Nghỉ Dưỡng Sức'.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			} */
		}
		public DataSet GetDataReportAdvanceSalary( string asDepartment,string asTeam,string asTufted, string asEmployee ,int aiMonth, int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Advance_Salary_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@IN_ID_Department", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asDepartment.Equals(""))
					myCommand.Parameters["@IN_ID_Department"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Department"].Value = asDepartment;

				lparam = new SqlParameter("@IN_ID_Team", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTeam.Equals(""))
					myCommand.Parameters["@IN_ID_Team"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Team"].Value = asTeam;

				lparam = new SqlParameter("@IN_ID_Tufted", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTufted.Equals(""))
					myCommand.Parameters["@IN_ID_Tufted"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Tufted"].Value = asTufted;

				lparam = new SqlParameter("@IN_ID_Employee", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asEmployee.Equals(""))
					myCommand.Parameters["@IN_ID_Employee"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Employee"].Value = asEmployee;

				dtsAdvanceSalary ldsAdvanceSalary = new dtsAdvanceSalary();
				ldsAdvanceSalary.EnforceConstraints = false;
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsAdvanceSalary.tbAdvanceSalary);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				//
				SetLogo(ldsAdvanceSalary.tbLogo);
				//
				return ldsAdvanceSalary;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Tạm ứng lương'.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Tạm ứng lương'.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			} */
		}
        public DataSet GetDataReportCheckWorker( string asDepartment,string asTeam,string asTufted, string asEmployee ,int aiMonth, int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Table_Check_Workers_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@IN_ID_Department", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asDepartment.Equals(""))
					myCommand.Parameters["@IN_ID_Department"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Department"].Value = asDepartment;

				lparam = new SqlParameter("@IN_ID_Team", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTeam.Equals(""))
					myCommand.Parameters["@IN_ID_Team"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Team"].Value = asTeam;

				lparam = new SqlParameter("@IN_ID_Tufted", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTufted.Equals(""))
					myCommand.Parameters["@IN_ID_Tufted"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Tufted"].Value = asTufted;

				lparam = new SqlParameter("@IN_ID_Employee", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asEmployee.Equals(""))
					myCommand.Parameters["@IN_ID_Employee"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Employee"].Value = asEmployee;

				dtsCheckWorker ldsCheckWorker = new dtsCheckWorker();
				ldsCheckWorker.EnforceConstraints = false;
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsCheckWorker.tbCheckWorker);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				SetLogo(ldsCheckWorker.tbLogo);
				
				return ldsCheckWorker;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Bảng Chấm Công'.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Bảng Chấm Công'.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportSalaryEmployee( string asDepartment,string asTeam,string asTufted, string asEmployee ,int aiMonth, int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Salary_Employee_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@IN_ID_Department", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asDepartment.Equals(""))
					myCommand.Parameters["@IN_ID_Department"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Department"].Value = asDepartment;

				lparam = new SqlParameter("@IN_ID_Team", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTeam.Equals(""))
					myCommand.Parameters["@IN_ID_Team"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Team"].Value = asTeam;

				lparam = new SqlParameter("@IN_ID_Tufted", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTufted.Equals(""))
					myCommand.Parameters["@IN_ID_Tufted"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Tufted"].Value = asTufted;

				lparam = new SqlParameter("@IN_ID_Employee", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asEmployee.Equals(""))
					myCommand.Parameters["@IN_ID_Employee"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Employee"].Value = asEmployee;

				dtsSalaryEmployee ldsSalaryEmployee = new dtsSalaryEmployee();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				ldsSalaryEmployee.EnforceConstraints = false;
				adap.Fill(ldsSalaryEmployee.tbSalaryEmployee);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				SetLogo(ldsSalaryEmployee.tbLogo);
				return ldsSalaryEmployee;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Bảng Lương Công Nhân'.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Bảng Lương Công Nhân'.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportSalaryEmployeeLeave( string asDepartment,string asTeam,string asTufted, string asEmployee ,int aiMonth, int aiYear)
		{
            return null;

			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Salary_Employee_Leave_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@IN_ID_Department", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asDepartment.Equals(""))
					myCommand.Parameters["@IN_ID_Department"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Department"].Value = asDepartment;

				lparam = new SqlParameter("@IN_ID_Team", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTeam.Equals(""))
					myCommand.Parameters["@IN_ID_Team"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Team"].Value = asTeam;

				lparam = new SqlParameter("@IN_ID_Tufted", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTufted.Equals(""))
					myCommand.Parameters["@IN_ID_Tufted"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Tufted"].Value = asTufted;

				lparam = new SqlParameter("@IN_ID_Employee", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asEmployee.Equals(""))
					myCommand.Parameters["@IN_ID_Employee"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Employee"].Value = asEmployee;

				dtsSalaryEmployeeLeave ldsSalaryEmployeeLeave = new dtsSalaryEmployeeLeave();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				ldsSalaryEmployeeLeave.EnforceConstraints = false;
				adap.Fill(ldsSalaryEmployeeLeave.tbSalaryEmployeeLeave);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				SetLogo(ldsSalaryEmployeeLeave.tbLogo);
				return ldsSalaryEmployeeLeave;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Bảng Lương Nhân Viên Nghỉ Việc'.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Bảng Lương Nhân Viên Nghỉ Việc'.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportTotalSalaryEmployeeInYear( string asDepartment,string asTeam, string asTufted,string asEmployee ,int aiType ,int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_TotalSalaryEmployee_InYear_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@IN_Type", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Type"].Value = aiType;

				lparam = new SqlParameter("@IN_ID_Department", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asDepartment.Equals(""))
					myCommand.Parameters["@IN_ID_Department"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Department"].Value = asDepartment;

				lparam = new SqlParameter("@IN_ID_Team", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTeam.Equals(""))
					myCommand.Parameters["@IN_ID_Team"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Team"].Value = asTeam;

				lparam = new SqlParameter("@IN_ID_Tufted", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTufted.Equals(""))
					myCommand.Parameters["@IN_ID_Tufted"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Tufted"].Value = asTufted;

				lparam = new SqlParameter("@IN_ID_Employee", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asEmployee.Equals(""))
					myCommand.Parameters["@IN_ID_Employee"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Employee"].Value = asEmployee;

				dtsTotalSalaryEmployeeInYear ldsTotalSalaryEmployeeInYear = new dtsTotalSalaryEmployeeInYear();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				ldsTotalSalaryEmployeeInYear.EnforceConstraints = false;
				adap.Fill(ldsTotalSalaryEmployeeInYear.tbTotalSalaryEmployeeInYear);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				SetLogo(ldsTotalSalaryEmployeeInYear.tbLogo);
				return ldsTotalSalaryEmployeeInYear;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Bảng Tổng Hợp Lương Cả Năm'.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Bảng Tổng Hợp Lương Cả Năm'.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportSalaryEmployeeATM( string asDepartment,string asTeam, string asTufted,string asEmployee ,int aiMonth ,int aiYear)
		{
            return null;

			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Salary_Employee_ATM_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@IN_ID_Department", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asDepartment.Equals(""))
					myCommand.Parameters["@IN_ID_Department"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Department"].Value = asDepartment;

				lparam = new SqlParameter("@IN_ID_Team", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTeam.Equals(""))
					myCommand.Parameters["@IN_ID_Team"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Team"].Value = asTeam;

				lparam = new SqlParameter("@IN_ID_Tufted", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTufted.Equals(""))
					myCommand.Parameters["@IN_ID_Tufted"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Tufted"].Value = asTufted;

				lparam = new SqlParameter("@IN_ID_Employee", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asEmployee.Equals(""))
					myCommand.Parameters["@IN_ID_Employee"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Employee"].Value = asEmployee;

				dtsSalaryEmployeeATM ldsSalaryEmployeeATM = new dtsSalaryEmployeeATM();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				ldsSalaryEmployeeATM.EnforceConstraints = false;
				adap.Fill(ldsSalaryEmployeeATM.tbSalaryEmployeeATM);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				SetLogo(ldsSalaryEmployeeATM.tbLogo);
				return ldsSalaryEmployeeATM;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Bảng Lương ATM'.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Bảng Lương ATM'.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			} */
		}
		public DataSet GetDataReportSalaryEmployeeIndirect( string asDepartment,string asTeam,string asTufted, string asEmployee ,int aiMonth, int aiYear)
		{
            return null;

            /*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Salary_Employee_Indirect_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@IN_ID_Department", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asDepartment.Equals(""))
					myCommand.Parameters["@IN_ID_Department"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Department"].Value = asDepartment;

				lparam = new SqlParameter("@IN_ID_Team", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTeam.Equals(""))
					myCommand.Parameters["@IN_ID_Team"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Team"].Value = asTeam;

				lparam = new SqlParameter("@IN_ID_Tufted", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTufted.Equals(""))
					myCommand.Parameters["@IN_ID_Tufted"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Tufted"].Value = asTufted;

				lparam = new SqlParameter("@IN_ID_Employee", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asEmployee.Equals(""))
					myCommand.Parameters["@IN_ID_Employee"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Employee"].Value = asEmployee;

				dtsSalaryEmployeeIndirect ldsSalaryEmployee = new dtsSalaryEmployeeIndirect();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				ldsSalaryEmployee.EnforceConstraints = false;
				adap.Fill(ldsSalaryEmployee.tbSalaryEmployeeIndirect);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				SetLogo(ldsSalaryEmployee.tbLogo);
				return ldsSalaryEmployee;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Bảng Lương Khối Gián Tiếp'.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Bảng Lương Khối Gián Tiếp'.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			} */
		}
		public DataSet GetDataReportEmployeeTradeUnion( string asDepartment,string asTeam, string asTufted,string asEmployee ,int aiMonth, int aiYear)
		{
            return null;

			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Employee_TradeUnion_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@IN_ID_Department", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asDepartment.Equals(""))
					myCommand.Parameters["@IN_ID_Department"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Department"].Value = asDepartment;

				lparam = new SqlParameter("@IN_ID_Team", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTeam.Equals(""))
					myCommand.Parameters["@IN_ID_Team"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Team"].Value = asTeam;

				lparam = new SqlParameter("@IN_ID_Tufted", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTufted.Equals(""))
					myCommand.Parameters["@IN_ID_Tufted"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Tufted"].Value = asTufted;

				lparam = new SqlParameter("@IN_ID_Employee", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asEmployee.Equals(""))
					myCommand.Parameters["@IN_ID_Employee"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Employee"].Value = asEmployee;

				dtsEmployeeTradeUnion ldsEmployeeTradeUnion = new dtsEmployeeTradeUnion();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				ldsEmployeeTradeUnion.EnforceConstraints = false;
				adap.Fill(ldsEmployeeTradeUnion.tbEmployeeTradeUnion);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				SetLogo(ldsEmployeeTradeUnion.tbLogo);
				return ldsEmployeeTradeUnion;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Danh Sách Công Đoàn'.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Danh Sách Công Đoàn'.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportEmployeeATMTradeUnion( string asDepartment,string asTeam, string asTufted,string asEmployee ,int aiMonth, int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Employee_ATM_TradeUnion_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@IN_ID_Department", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asDepartment.Equals(""))
					myCommand.Parameters["@IN_ID_Department"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Department"].Value = asDepartment;

				lparam = new SqlParameter("@IN_ID_Team", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTeam.Equals(""))
					myCommand.Parameters["@IN_ID_Team"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Team"].Value = asTeam;

				lparam = new SqlParameter("@IN_ID_Tufted", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTufted.Equals(""))
					myCommand.Parameters["@IN_ID_Tufted"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Tufted"].Value = asTufted;

				lparam = new SqlParameter("@IN_ID_Employee", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asEmployee.Equals(""))
					myCommand.Parameters["@IN_ID_Employee"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Employee"].Value = asEmployee;

				dtsEmployeeATMTradeUnion ldsEmployeeATMTradeUnion = new dtsEmployeeATMTradeUnion();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				ldsEmployeeATMTradeUnion.EnforceConstraints = false;
				adap.Fill(ldsEmployeeATMTradeUnion.tbEmployeeATMTradeUnion);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				SetLogo(ldsEmployeeATMTradeUnion.tbLogo);
				return ldsEmployeeATMTradeUnion;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Danh Sách Công Đoàn ATM'.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Danh Sách Công Đoàn ATM'.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportEmployeeManagement( string asDepartment,string asTeam,string asTufted, string asEmployee ,int aiMonth, int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Salary_Management_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@IN_ID_Department", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asDepartment.Equals(""))
					myCommand.Parameters["@IN_ID_Department"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Department"].Value = asDepartment;

				lparam = new SqlParameter("@IN_ID_Team", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTeam.Equals(""))
					myCommand.Parameters["@IN_ID_Team"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Team"].Value = asTeam;

				lparam = new SqlParameter("@IN_ID_Tufted", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTufted.Equals(""))
					myCommand.Parameters["@IN_ID_Tufted"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Tufted"].Value = asTufted;


				lparam = new SqlParameter("@IN_ID_Employee", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asEmployee.Equals(""))
					myCommand.Parameters["@IN_ID_Employee"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Employee"].Value = asEmployee;

				dtsEmployeeManagement ldsEmployeeM = new dtsEmployeeManagement();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				ldsEmployeeM.EnforceConstraints = false;
				adap.Fill(ldsEmployeeM.tbEmployeeManagement);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				SetLogo(ldsEmployeeM.tbLogo);
				return ldsEmployeeM;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Bảng Lương Ban Điều Hành'.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Bảng Lương Ban Điều Hành'.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportSheetSalaryEmployee( string asDepartment,string asTeam,string asTufted, string asEmployee ,int aiMonth, int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_SheetSalary_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@IN_ID_Department", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asDepartment.Equals(""))
					myCommand.Parameters["@IN_ID_Department"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Department"].Value = asDepartment;

				lparam = new SqlParameter("@IN_ID_Team", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTeam.Equals(""))
					myCommand.Parameters["@IN_ID_Team"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Team"].Value = asTeam;

				lparam = new SqlParameter("@IN_ID_Tufted", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTufted.Equals(""))
					myCommand.Parameters["@IN_ID_Tufted"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Tufted"].Value = asTufted;


				lparam = new SqlParameter("@IN_ID_Employee", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asEmployee.Equals(""))
					myCommand.Parameters["@IN_ID_Employee"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Employee"].Value = asEmployee;

				dtsSheetSalaryEmployee ldsSheetSalaryEmployee = new dtsSheetSalaryEmployee();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				ldsSheetSalaryEmployee.EnforceConstraints = false;
				adap.Fill(ldsSheetSalaryEmployee.tbSheetSalaryEmployee);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				SetLogo(ldsSheetSalaryEmployee.tbLogo);
				return ldsSheetSalaryEmployee;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Phiếu Lương Nhân Viên'.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Phiếu Lương Nhân Viên'.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportEmployeeBankATM( string asBank ,int aiMonth, int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Bank_ATM_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;
				
				
				lparam = new SqlParameter("@IN_Bank_Code", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asBank.Equals(""))
					myCommand.Parameters["@IN_Bank_Code"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_Bank_Code"].Value = asBank;
				dtsBankATM ldsBankATM = new dtsBankATM();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				ldsBankATM.EnforceConstraints = false;
				adap.Fill(ldsBankATM.tbBankATM);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				SetLogo(ldsBankATM.tbLogo);
				return ldsBankATM;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Bảng Lương ATM'.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Bảng Lương ATM'.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportEmployeeBankATMOther( string asBank ,int aiMonth, int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Bank_ATM_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;
				
				
				lparam = new SqlParameter("@IN_Bank_Code", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asBank.Equals(""))
					myCommand.Parameters["@IN_Bank_Code"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_Bank_Code"].Value = asBank;
				dtsBankATM ldsBankATM = new dtsBankATM();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				ldsBankATM.EnforceConstraints = false;
				adap.Fill(ldsBankATM, "tbBankATM");
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				return ldsBankATM;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Bảng Lương ATM'.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Bảng Lương ATM'.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportListReport(string asStoreName,string asResignation,string asEducation,string asContract,string asOrganization,string asEthnic, string asReligion,string asNative, string asAge, string asWorkday ,int aiMonth, int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				if(asStoreName.Equals("Nghỉ Việc"))
				{
					SqlCommand myCommand = new SqlCommand("sp3s_TotalHR_Resignation_Report", lConnection);
					myCommand.CommandType = CommandType.StoredProcedure;
					myCommand.CommandTimeout = 30000;
					myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

					SqlParameter lparam = new SqlParameter("@IN_IDResignation", SqlDbType.NVarChar, 3000);
					myCommand.Parameters.Add(lparam);
					if(asResignation.Equals(""))
						myCommand.Parameters["@IN_IDResignation"].Value = System.DBNull.Value;
					else
						myCommand.Parameters["@IN_IDResignation"].Value = asResignation;
					dtsListReport ldsLS = new dtsListReport();
					SqlDataAdapter adap = new SqlDataAdapter(myCommand);
					ldsLS.EnforceConstraints = false;
					adap.Fill(ldsLS.tbListReport);
					lConnection.Close();
					myCommand.Dispose();
					adap.Dispose();
					SetLogo(ldsLS.tbLogo);
					return ldsLS;
					
				}
				else if(asStoreName.Equals("Trình Độ"))
				{
					SqlCommand myCommand = new SqlCommand("sp3s_TotalHR_Education_Report", lConnection);
					myCommand.CommandType = CommandType.StoredProcedure;
					myCommand.CommandTimeout = 30000;
					myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

					SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
					myCommand.Parameters.Add(lparam);
					myCommand.Parameters["@IN_Month"].Value = aiMonth;

					lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
					myCommand.Parameters.Add(lparam);
					myCommand.Parameters["@IN_Year"].Value = aiYear;
				
				
					lparam = new SqlParameter("@IN_IDEducation", SqlDbType.NVarChar, 3000);
					myCommand.Parameters.Add(lparam);
					if(asEducation.Equals(""))
						myCommand.Parameters["@IN_IDEducation"].Value = System.DBNull.Value;
					else
						myCommand.Parameters["@IN_IDEducation"].Value = asEducation;
					dtsListReport ldsLS = new dtsListReport();
					SqlDataAdapter adap = new SqlDataAdapter(myCommand);
					ldsLS.EnforceConstraints = false;
					adap.Fill(ldsLS.tbListReport);
					lConnection.Close();
					myCommand.Dispose();
					adap.Dispose();
					SetLogo(ldsLS.tbLogo);
					return ldsLS;
				
				}
				else if(asStoreName.Equals("Hợp Đồng"))
				{
					SqlCommand myCommand = new SqlCommand("sp3s_TotalHR_Contract_Report", lConnection);
					myCommand.CommandType = CommandType.StoredProcedure;
					myCommand.CommandTimeout = 30000;
					myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

					SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
					myCommand.Parameters.Add(lparam);
					myCommand.Parameters["@IN_Month"].Value = aiMonth;

					lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
					myCommand.Parameters.Add(lparam);
					myCommand.Parameters["@IN_Year"].Value = aiYear;
				
				
					lparam = new SqlParameter("@IN_IDContractType", SqlDbType.NVarChar, 3000);
					myCommand.Parameters.Add(lparam);
					if(asContract.Equals(""))
						myCommand.Parameters["@IN_IDContractType"].Value = System.DBNull.Value;
					else
						myCommand.Parameters["@IN_IDContractType"].Value = asContract;	
					dtsListReport ldsLS = new dtsListReport();
					SqlDataAdapter adap = new SqlDataAdapter(myCommand);
					ldsLS.EnforceConstraints = false;
					adap.Fill(ldsLS.tbListReport);
					lConnection.Close();
					myCommand.Dispose();
					adap.Dispose();
					SetLogo(ldsLS.tbLogo);
					return ldsLS;
				}
				else if(asStoreName.Equals("Tổ Chức"))
				{
					SqlCommand myCommand = new SqlCommand("sp3s_TotalHR_Organization_Report", lConnection);
					myCommand.CommandType = CommandType.StoredProcedure;
					myCommand.CommandTimeout = 30000;
					myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

					SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
					myCommand.Parameters.Add(lparam);
					myCommand.Parameters["@IN_Month"].Value = aiMonth;

					lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
					myCommand.Parameters.Add(lparam);
					myCommand.Parameters["@IN_Year"].Value = aiYear;
				
				
					lparam = new SqlParameter("@IN_IDOrganization", SqlDbType.NVarChar, 3000);
					myCommand.Parameters.Add(lparam);
					if(asOrganization.Equals(""))
						myCommand.Parameters["@IN_IDOrganization"].Value = System.DBNull.Value;
					else
						myCommand.Parameters["@IN_IDOrganization"].Value = asOrganization;
					dtsListReport ldsLS = new dtsListReport();
					SqlDataAdapter adap = new SqlDataAdapter(myCommand);
					ldsLS.EnforceConstraints = false;
					adap.Fill(ldsLS.tbListReport);
					lConnection.Close();
					myCommand.Dispose();
					adap.Dispose();
					SetLogo(ldsLS.tbLogo);
					return ldsLS;
				}
				else if(asStoreName.Equals("Dân Tộc"))
				{
					
					SqlCommand myCommand = new SqlCommand("sp3s_TotalHR_Ethnic_Report", lConnection);
					myCommand.CommandType = CommandType.StoredProcedure;
					myCommand.CommandTimeout = 30000;
					myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

					SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
					myCommand.Parameters.Add(lparam);
					myCommand.Parameters["@IN_Month"].Value = aiMonth;

					lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
					myCommand.Parameters.Add(lparam);
					myCommand.Parameters["@IN_Year"].Value = aiYear;
				
				
					lparam = new SqlParameter("@IN_IDEthnic", SqlDbType.NVarChar, 3000);
					myCommand.Parameters.Add(lparam);
					if(asEthnic.Equals(""))
						myCommand.Parameters["@IN_IDEthnic"].Value = System.DBNull.Value;
					else
						myCommand.Parameters["@IN_IDEthnic"].Value = asEthnic;
					dtsListReport ldsLS = new dtsListReport();
					SqlDataAdapter adap = new SqlDataAdapter(myCommand);
					ldsLS.EnforceConstraints = false;
					adap.Fill(ldsLS.tbListReport);
					lConnection.Close();
					myCommand.Dispose();
					adap.Dispose();
					SetLogo(ldsLS.tbLogo);
					return ldsLS;
				}
				else if(asStoreName.Equals("Tôn Giáo"))
				{
					SqlCommand myCommand = new SqlCommand("sp3s_TotalHR_Religion_Report", lConnection);
					myCommand.CommandType = CommandType.StoredProcedure;
					myCommand.CommandTimeout = 30000;
					myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

					SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
					myCommand.Parameters.Add(lparam);
					myCommand.Parameters["@IN_Month"].Value = aiMonth;

					lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
					myCommand.Parameters.Add(lparam);
					myCommand.Parameters["@IN_Year"].Value = aiYear;
				
				
					lparam = new SqlParameter("@IN_IDReligion", SqlDbType.NVarChar, 3000);
					myCommand.Parameters.Add(lparam);
					if(asReligion.Equals(""))
						myCommand.Parameters["@IN_IDReligion"].Value = System.DBNull.Value;
					else
						myCommand.Parameters["@IN_IDReligion"].Value = asReligion;
					dtsListReport ldsLS = new dtsListReport();
					SqlDataAdapter adap = new SqlDataAdapter(myCommand);
					ldsLS.EnforceConstraints = false;
					adap.Fill(ldsLS.tbListReport);
					lConnection.Close();
					myCommand.Dispose();
					adap.Dispose();
					SetLogo(ldsLS.tbLogo);
					return ldsLS;
				
				}
				else if(asStoreName.Equals("Quê Quán"))
				{
					SqlCommand myCommand = new SqlCommand("sp3s_TotalHR_Native_Report", lConnection);
					myCommand.CommandType = CommandType.StoredProcedure;
					myCommand.CommandTimeout = 30000;
					myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

					SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
					myCommand.Parameters.Add(lparam);
					myCommand.Parameters["@IN_Month"].Value = aiMonth;

					lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
					myCommand.Parameters.Add(lparam);
					myCommand.Parameters["@IN_Year"].Value = aiYear;
				
				
					lparam = new SqlParameter("@IN_IDNative", SqlDbType.NVarChar, 3000);
					myCommand.Parameters.Add(lparam);
					if(asNative.Equals(""))
						myCommand.Parameters["@IN_IDNative"].Value = System.DBNull.Value;
					else
						myCommand.Parameters["@IN_IDNative"].Value = asNative;
					dtsListReport ldsLS = new dtsListReport();
					SqlDataAdapter adap = new SqlDataAdapter(myCommand);
					ldsLS.EnforceConstraints = false;
					adap.Fill(ldsLS.tbListReport);
					lConnection.Close();
					myCommand.Dispose();
					adap.Dispose();
					SetLogo(ldsLS.tbLogo);
					return ldsLS;
				}
				else if(asStoreName.Equals("Độ Tuổi"))
				{
					SqlCommand myCommand = new SqlCommand("sp3s_TotalHR_Age_Report", lConnection);
					myCommand.CommandType = CommandType.StoredProcedure;
					myCommand.CommandTimeout = 30000;
					myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

					SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
					myCommand.Parameters.Add(lparam);
					myCommand.Parameters["@IN_Month"].Value = aiMonth;

					lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
					myCommand.Parameters.Add(lparam);
					myCommand.Parameters["@IN_Year"].Value = aiYear;
				
				
					lparam = new SqlParameter("@IN_Age", SqlDbType.NVarChar, 3000);
					myCommand.Parameters.Add(lparam);
					if(asAge.Equals(""))
						myCommand.Parameters["@IN_Age"].Value = System.DBNull.Value;
					else
						myCommand.Parameters["@IN_Age"].Value = asAge;
					dtsListReport ldsLS = new dtsListReport();
					SqlDataAdapter adap = new SqlDataAdapter(myCommand);
					ldsLS.EnforceConstraints = false;
					adap.Fill(ldsLS.tbListReport);
					lConnection.Close();
					myCommand.Dispose();
					adap.Dispose();
					SetLogo(ldsLS.tbLogo);
					return ldsLS;
				}
				else if(asStoreName.Equals("Số Tháng"))
				{
					SqlCommand myCommand = new SqlCommand("sp3s_TotalHR_OverWorkMonth_Report", lConnection);
					myCommand.CommandType = CommandType.StoredProcedure;
					myCommand.CommandTimeout = 30000;
					myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

					SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
					myCommand.Parameters.Add(lparam);
					myCommand.Parameters["@IN_Month"].Value = aiMonth;

					lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
					myCommand.Parameters.Add(lparam);
					myCommand.Parameters["@IN_Year"].Value = aiYear;
				
				
					lparam = new SqlParameter("@IN_WorkMonth", SqlDbType.NVarChar, 3000);
					myCommand.Parameters.Add(lparam);
					if(asWorkday.Equals(""))
						myCommand.Parameters["@IN_WorkMonth"].Value = System.DBNull.Value;
					else
						myCommand.Parameters["@IN_WorkMonth"].Value = asWorkday;

					dtsListReport ldsLS = new dtsListReport();
					SqlDataAdapter adap = new SqlDataAdapter(myCommand);
					ldsLS.EnforceConstraints = false;
					adap.Fill(ldsLS.tbListReport);
					lConnection.Close();
					myCommand.Dispose();
					adap.Dispose();
					SetLogo(ldsLS.tbLogo);
					return ldsLS;
				}
				return null;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Danh Mục Các Báo Cáo'.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Bảng Lương ATM'.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportTotalSalaryEmployee( int aiMonth, int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Employee_Salary_Total_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				dtsSalaryEmployeeTotal ldsSalaryEmployeeTotal = new dtsSalaryEmployeeTotal();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsSalaryEmployeeTotal.tbSalaryEmployeeTotal);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsSalaryEmployeeTotal.EnforceConstraints = false;
				SetLogo(ldsSalaryEmployeeTotal.tbLogo);
				return ldsSalaryEmployeeTotal;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Tổng hợp tiền lương công nhân'.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Tổng hợp tiền lương công nhân'.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportImportSalaryA( int aiMonth, int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_ComunicationA_ImportSalary_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				dtsImportSalaryA ldsImportSalaryA = new dtsImportSalaryA();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsImportSalaryA.tbImportSalaryA);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsImportSalaryA.EnforceConstraints = false;
				SetLogo(ldsImportSalaryA.tbLogo);
				return ldsImportSalaryA;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Nhập Lương '.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Nhập Lương'.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportTotalSalaryA( int aiMonth, int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_ComunicationA_TotalSalary_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				dtsTotalSalaryA ldsTotalSalaryA = new dtsTotalSalaryA();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsTotalSalaryA.tbTotalSalaryA);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsTotalSalaryA.EnforceConstraints = false;
				SetLogo(ldsTotalSalaryA.tbLogo);
				return ldsTotalSalaryA;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Tổng Lương '.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Tổng Lương'.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportSheetSalaryA( int aiMonth, int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("dbo.sp3s_ComunicationA_SheetSalary_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				dtsSheetSalary ldsSheetSalary = new dtsSheetSalary();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsSheetSalary.tbSheetSalary);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsSheetSalary.EnforceConstraints = false;
				SetLogo(ldsSheetSalary.tbLogo);
				return ldsSheetSalary;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Phiếu Lương '.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Phiếu Lương'.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportSalaryEmployeeTotalATM( int aiMonth, int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Salary_Employee_Total_ATM_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				dtsSalaryEmployeeTotalATM ldsSalaryEmployeeTotalATM = new dtsSalaryEmployeeTotalATM();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsSalaryEmployeeTotalATM.tbSalaryEmployeeTotalATM);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsSalaryEmployeeTotalATM.EnforceConstraints = false;
				SetLogo(ldsSalaryEmployeeTotalATM.tbLogo);
				return ldsSalaryEmployeeTotalATM;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Tổng hợp tiền lương ATM '.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Tổng hợp tiền lương ATM '.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportTotalSalary( int aiMonth, int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Calculate_TotalSalary_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				dtsTotalSalary ldsTotalSalary = new dtsTotalSalary();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsTotalSalary.tbTotalSalary);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsTotalSalary.EnforceConstraints = false;
				SetLogo(ldsTotalSalary.tbLogo);
				return ldsTotalSalary;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Bảng tổng hợp'.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Bảng tổng hợp '.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportTotalLeaveSalary( int aiMonth, int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Calculate_TotalLeaveSalary_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				dtsTotalLeaveSalary ldsTotalLeaveSalary = new dtsTotalLeaveSalary();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsTotalLeaveSalary.tbTotalLeaveSalary);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsTotalLeaveSalary.EnforceConstraints = false;
				SetLogo(ldsTotalLeaveSalary.tbLogo);
				return ldsTotalLeaveSalary;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Bảng tổng hợp'.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Bảng tổng hợp'.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportTotalBudSalary( int aiMonth, int aiYear)
		{
            return null;
            /*
			SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Calculate_TotalBudgetSalary_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				dtsTotalBudgetSalary ldsTotalBSalary = new dtsTotalBudgetSalary();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsTotalBSalary.tbTotalBudgetSalary);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsTotalBSalary.EnforceConstraints = false;
				SetLogo(ldsTotalBSalary.tbLogo);
				return ldsTotalBSalary;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Bảng tổng hợp'.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Bảng tổng hợp'.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportTotalSalaryFactory( int aiMonth, int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Salary_Total_Factory_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				dtsTotalSalaryFactory ldsTotalSalaryFactory = new dtsTotalSalaryFactory();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsTotalSalaryFactory.tbTotalSalaryFactory);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsTotalSalaryFactory.EnforceConstraints = false;
				SetLogo(ldsTotalSalaryFactory.tbLogo);
				return ldsTotalSalaryFactory;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Tổng hợp lương Toàn Nhà Máy '.", "Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Tổng hợp lương toàn nhà máy '.", "Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportEmployeeLeave( int aiMonth, int aiYear)
        {
            return null;
            /*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Employee_Leave_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				dtsEmployeeLeave ldsEmployeeLeave = new dtsEmployeeLeave();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsEmployeeLeave.tbEmployeeLeave);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsEmployeeLeave.EnforceConstraints = false;
				SetLogo(ldsEmployeeLeave.tbLogo);
				return ldsEmployeeLeave;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Danh Sách Nhân Viên Nghỉ Việc'.", " Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Danh Sách Nhân Viên Nghỉ Việc'.", " Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportEmployeeEntry( int aiMonth, int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Employee_Entry_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				dtsEmployeeEntry ldsEmployeeEntry = new dtsEmployeeEntry();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsEmployeeEntry.tbEmployeeEntry);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsEmployeeEntry.EnforceConstraints = false;
				SetLogo(ldsEmployeeEntry.tbLogo);
				return ldsEmployeeEntry;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Danh Sách Nhân Viên Nhận Việc'.", " Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Danh Sách Nhân Viên Nhận Việc'.", " Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportHumanResourceListAge( int aiMonth, int aiYear,string asFromAge,string asToAge )
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_HumanResourceList_Age_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;
				
				
				lparam = new SqlParameter("@IN_FromAge", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asFromAge.Equals(""))
					myCommand.Parameters["@IN_FromAge"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_FromAge"].Value = asFromAge;

				lparam = new SqlParameter("@IN_ToAge", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asToAge.Equals(""))
					myCommand.Parameters["@IN_ToAge"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ToAge"].Value = asToAge;

				dtsHumanResourceListAge ldsHRLAge = new dtsHumanResourceListAge();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				ldsHRLAge.EnforceConstraints = false;
				adap.Fill(ldsHRLAge.tbHumanResourceListAge);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				SetLogo(ldsHRLAge.tbLogo);
				return ldsHRLAge;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Danh Sách Nhân Viên Theo Độ Tuổi'.", " Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Danh Sách Nhân Viên Theo Độ Tuổi'.", " Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			} */
		}
		public DataSet GetDataReportHumanResourceListOverWorkMonth( int aiMonth, int aiYear,string asDept,string asTeam,string asTufted,string asWorkFromMonth, string asWorkToMonth )
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_HumanResourceList_OverWorkMonth_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@IN_IDDepartment", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asDept.Equals(""))
					myCommand.Parameters["@IN_IDDepartment"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_IDDepartment"].Value = asDept;
				
				lparam = new SqlParameter("@IN_IDTeam", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTeam.Equals(""))
					myCommand.Parameters["@IN_IDTeam"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_IDTeam"].Value = asTeam;

				lparam = new SqlParameter("@IN_IDTufted", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTufted.Equals(""))
					myCommand.Parameters["@IN_IDTufted"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_IDTufted"].Value = asTufted;

				lparam = new SqlParameter("@IN_WorkFromMonth", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asWorkFromMonth.Equals(""))
					myCommand.Parameters["@IN_WorkFromMonth"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_WorkFromMonth"].Value = asWorkFromMonth;

				lparam = new SqlParameter("@IN_WorkToMonth", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asWorkToMonth.Equals(""))
					myCommand.Parameters["@IN_WorkToMonth"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_WorkToMonth"].Value = asWorkToMonth;
				dtsHumanResourceListOverWorkMonth ldsHRLOWM = new dtsHumanResourceListOverWorkMonth();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				ldsHRLOWM.EnforceConstraints = false;
				adap.Fill(ldsHRLOWM.tbHumanResourceListOverWorkMonth);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				SetLogo(ldsHRLOWM.tbLogo);
				return ldsHRLOWM;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Danh Sách Nhân Viên Làm Việc Trên Số Tháng'.", " Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Danh Sách Nhân Viên Làm Việc Trên Số Tháng'.", " Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportHumanResourceListHealthy( int aiMonth, int aiYear,string asHealthy )
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_HumanResourceList_Healthy_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;
				
				
				lparam = new SqlParameter("@IN_MonthHealth", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asHealthy.Equals(""))
					myCommand.Parameters["@IN_MonthHealth"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_MonthHealth"].Value = asHealthy;
				dtsHumanResourceListHealthy ldsHRLHealth = new dtsHumanResourceListHealthy();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				ldsHRLHealth.EnforceConstraints = false;
				adap.Fill(ldsHRLHealth.tbHumanResourceListHealthy);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				SetLogo(ldsHRLHealth.tbLogo);
				return ldsHRLHealth;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Danh Sách Nhân Viên Khám Sức Khỏe Định Kỳ'.", " Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Danh Sách Nhân Viên Khám Sức Khỏe Định Kỳ'.", " Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportEmployeeTotal(int aiMonth, int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Employee_Total_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				dtsEmployeeTotal ldsEmployeeTotal = new dtsEmployeeTotal();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsEmployeeTotal.tbEmployeeTotal);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsEmployeeTotal.EnforceConstraints = false;
				SetLogo(ldsEmployeeTotal.tbLogo);
				return ldsEmployeeTotal;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Bảng Tổng Hợp Nhân Sự Toàn Công Ty'.", " Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Bảng Tổng Hợp Nhân Sự Toàn Công Ty'.", " Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportTotalHRBeginPeriod(int aiMonth, int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_TotalHR_BeginPeriod_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				dtsTotalHRBeginPeriod ldsTotalHRBP = new dtsTotalHRBeginPeriod();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsTotalHRBP.tbTotalHRBeginPeriod);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsTotalHRBP.EnforceConstraints = false;
				SetLogo(ldsTotalHRBP.tbLogo);
				return ldsTotalHRBP;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Nội Dung Các Danh Mục Báo Cáo'.", " Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Nội Dung Các Danh Mục Báo Cáo'.", " Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportEmployeeChange(int aiMonth, int aiYear)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Employee_Change_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				dtsEmployeeChange ldsEmployeeChange = new dtsEmployeeChange();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsEmployeeChange.tbEmployeeChange);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsEmployeeChange.EnforceConstraints = false;
				SetLogo(ldsEmployeeChange.tbLogo);
				return ldsEmployeeChange;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Bảng Tổng Hợp Nhân Sự Toàn Công Ty'.", " Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Bảng Tổng Hợp Nhân Sự Toàn Công Ty'.", " Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportHumanResourceListContract(int aiMonth, int aiYear, string asContract)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_HumanResourceList_Contract_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				
				lparam = new SqlParameter("@IN_IDContractType", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asContract == null || asContract.Equals(""))
					myCommand.Parameters["@IN_IDContractType"].Value = DBNull.Value;
				else
					myCommand.Parameters["@IN_IDContractType"].Value = asContract;

				dtsHumanResourceListContract ldsHRLC = new dtsHumanResourceListContract();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsHRLC.tbHumanResourceListContract);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsHRLC.EnforceConstraints = false;
				SetLogo(ldsHRLC.tbLogo);
				return ldsHRLC;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Danh Sách Nhân Viên Theo Từng Loại Hợp Đồng'.", " Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Danh Sách Nhân Viên Theo Từng Loại Hợp Đồng'.", " Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportHumanResourceListEducation(int aiMonth, int aiYear, string asEducation)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_HumanResourceList_Education_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				
				lparam = new SqlParameter("@IN_IDEducation", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asEducation == null || asEducation.Equals(""))
					myCommand.Parameters["@IN_IDEducation"].Value = DBNull.Value;
				else
					myCommand.Parameters["@IN_IDEducation"].Value = asEducation;

				dtsHumanResourceListEducation ldsHRLE = new dtsHumanResourceListEducation();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsHRLE.tbHumanResourceListEducation);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsHRLE.EnforceConstraints = false;
				SetLogo(ldsHRLE.tbLogo);
				return ldsHRLE;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Danh Sách Nhân Viên Theo Trình Độ Văn Hóa'.", " Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Danh Sách Nhân Viên Theo Trình Độ Văn Hóa'.", " Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportHumanResourceListEthnic(int aiMonth, int aiYear, string asEthnic)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_HumanResourceList_Ethnic_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				
				lparam = new SqlParameter("@IN_IDEthnic", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asEthnic == null || asEthnic.Equals(""))
					myCommand.Parameters["@IN_IDEthnic"].Value = DBNull.Value;
				else
					myCommand.Parameters["@IN_IDEthnic"].Value = asEthnic;

				dtsHumanResourceListEthnic ldsHRLETH = new dtsHumanResourceListEthnic();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsHRLETH.tbHumanResourceListEthnic);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsHRLETH.EnforceConstraints = false;
				SetLogo(ldsHRLETH.tbLogo);
				return ldsHRLETH;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Danh Sách Nhân Viên Theo Trình Độ Văn Hóa'.", " Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Danh Sách Nhân Viên Theo Trình Độ Văn Hóa'.", " Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportHumanResourceListNative(int aiMonth, int aiYear, string asNative)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_HumanResourceList_Native_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				
				lparam = new SqlParameter("@IN_IDNative", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asNative == null || asNative.Equals(""))
					myCommand.Parameters["@IN_IDNative"].Value = DBNull.Value;
				else
					myCommand.Parameters["@IN_IDNative"].Value = asNative;

				dtsHumanResourceListNative ldsHRLN = new dtsHumanResourceListNative();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsHRLN.tbHumanResourceListNative);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsHRLN.EnforceConstraints = false;
				SetLogo(ldsHRLN.tbLogo);
				return ldsHRLN;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Danh Sách Nhân Viên Theo Quê Quán'.", " Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Danh Sách Nhân Viên Theo Quê Quán'.", " Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportHumanResourceListOrganization(int aiMonth, int aiYear, string asOrganization)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_HumanResourceList_Organization_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				
				lparam = new SqlParameter("@IN_IDOrganization", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asOrganization == null || asOrganization.Equals(""))
					myCommand.Parameters["@IN_IDOrganization"].Value = DBNull.Value;
				else
					myCommand.Parameters["@IN_IDOrganization"].Value = asOrganization;

				dtsHumanResourceListOrganization ldsHRLO = new dtsHumanResourceListOrganization();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsHRLO.tbHumanResourceListOrganization);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsHRLO.EnforceConstraints = false;
				SetLogo(ldsHRLO.tbLogo);
				return ldsHRLO;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Danh Sách Nhân Viên Theo Tổ Chức'.", " Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Danh Sách Nhân Viên Theo Tổ Chức'.", " Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportHumanResourceListReligion(int aiMonth, int aiYear, string asReligion)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_HumanResourceList_Religion_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				
				lparam = new SqlParameter("@IN_IDReligion", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asReligion == null || asReligion.Equals(""))
					myCommand.Parameters["@IN_IDReligion"].Value = DBNull.Value;
				else
					myCommand.Parameters["@IN_IDReligion"].Value = asReligion;

				dtsHumanResourceListReligion ldsHRLR = new dtsHumanResourceListReligion();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsHRLR.tbHumanResourceListReligion);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsHRLR.EnforceConstraints = false;
				SetLogo(ldsHRLR.tbLogo);
				return ldsHRLR;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Danh Sách Nhân Viên Theo Tôn Giáo'.", " Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Danh Sách Nhân Viên Theo Tôn Giáo'.", " Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
		public DataSet GetDataReportEmployeeOverXMonth(int aiMonth, int aiYear, int aiNumber, string asDep)
		{
            return null;
			/*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_EmpOverXMonth_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@IN_Number", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Number"].Value = aiNumber;

				lparam = new SqlParameter("@IN_IDDep", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asDep == null || asDep.Equals(""))
					myCommand.Parameters["@IN_IDDep"].Value = DBNull.Value;
				else
					myCommand.Parameters["@IN_IDDep"].Value = asDep;

				dtsEmployeeOverXMonth ldsEmployeeOverXMonth = new dtsEmployeeOverXMonth();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsEmployeeOverXMonth.tbEmployeeOverXMonth);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsEmployeeOverXMonth.EnforceConstraints = false;
				SetLogo(ldsEmployeeOverXMonth.tbLogo);
				return ldsEmployeeOverXMonth;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Báo Cáo Nhân Sự Các Xưởng Làm Việc'.", " Lỗi : " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương thức trong 'Báo Cáo Nhân Sự Các Xưởng Làm Việc'.", " Lỗi: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
		}
        public DataSet GetDataReportSIAdjust(string asDepartment, string asTeam, string asTufted, int aiMonth, int aiYear)
        {
            return null;
            /*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Social_Insurance_Adjust_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@IN_ID_Department", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asDepartment.Equals(""))
					myCommand.Parameters["@IN_ID_Department"].Value = DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Department"].Value = asDepartment;

				lparam = new SqlParameter("@IN_ID_Team", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTeam.Equals(""))
					myCommand.Parameters["@IN_ID_Team"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Team"].Value = asTeam;

				lparam = new SqlParameter("@IN_ID_Tufted", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTufted.Equals(""))
					myCommand.Parameters["@IN_ID_Tufted"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Tufted"].Value = asTufted;

				dtsSocialInsurance_Adjust ldsReportSIAdj = new dtsSocialInsurance_Adjust();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsReportSIAdj.tbSocialInsurance_Adjust);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsReportSIAdj.EnforceConstraints = false;
				SetLogo(ldsReportSIAdj.tbLogo);
				return ldsReportSIAdj;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "In GetDataReportSIAdjust method.", "SQL error message: " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "In GetDataReportSIAdjust method.", "Error message: " + ex.Message);
				lConnection.Close();
				return null;
			} */
        }
        public DataSet GetDataReportSIAdd(string asDepartment, string asTeam, string asTufted, int aiMonth, int aiYear)
        {
            return null;
            /*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Social_Insurance_Add_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@IN_ID_Department", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asDepartment.Equals(""))
					myCommand.Parameters["@IN_ID_Department"].Value = DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Department"].Value = asDepartment;

				lparam = new SqlParameter("@IN_ID_Team", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTeam.Equals(""))
					myCommand.Parameters["@IN_ID_Team"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Team"].Value = asTeam;
				
				lparam = new SqlParameter("@IN_ID_Tufted", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTufted.Equals(""))
					myCommand.Parameters["@IN_ID_Tufted"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Tufted"].Value = asTufted;

				dtsSocialInsurance_Add ldsocialInsuranceAdd = new dtsSocialInsurance_Add();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsocialInsuranceAdd.tbSocialInsurance_Add);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsocialInsuranceAdd.EnforceConstraints = false;
				SetLogo(ldsocialInsuranceAdd.tbLogo);
				return ldsocialInsuranceAdd;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Mức nộp bổ sung BHXH'.", "SQL error message: " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Mức nộp bổ sung BHXH'.", "Error message: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
        }
        public DataSet GetDataReportSIAdjustInfo(string asDepartment, string asTeam, string asTufted, int aiMonth, int aiYear)
        {
            return null;
            /*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_SocialInsurance_AdjustInfo_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@IN_ID_Department", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asDepartment.Equals(""))
					myCommand.Parameters["@IN_ID_Department"].Value = DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Department"].Value = asDepartment;

				lparam = new SqlParameter("@IN_ID_Team", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTeam.Equals(""))
					myCommand.Parameters["@IN_ID_Team"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Team"].Value = asTeam;

				lparam = new SqlParameter("@IN_ID_Tufted", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTufted.Equals(""))
					myCommand.Parameters["@IN_ID_Tufted"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Tufted"].Value = asTufted;

				dtsSocialInsurance_AdjustInfo ldsocialInsuranceAdjustInfo = new dtsSocialInsurance_AdjustInfo();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsocialInsuranceAdjustInfo.tbSocialInsurance_AdjustInfo);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsocialInsuranceAdjustInfo.EnforceConstraints = false;
				SetLogo(ldsocialInsuranceAdjustInfo.tbLogo);
				return ldsocialInsuranceAdjustInfo;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Điều Chỉnh Hồ Sơ BHXH,BHYT'.", "SQL error message: " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Điều Chỉnh Hồ Sơ BHXH,BHYT'.", "Error message: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
        }
        public DataSet GetDataReportSIProposal(string asDepartment, string asTeam, string asTufted, int aiMonth, int aiYear)
        {
            return null;
            /*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_SocialInsurance_Proposal_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@IN_ID_Department", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asDepartment.Equals(""))
					myCommand.Parameters["@IN_ID_Department"].Value = DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Department"].Value = asDepartment;

				lparam = new SqlParameter("@IN_ID_Team", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTeam.Equals(""))
					myCommand.Parameters["@IN_ID_Team"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Team"].Value = asTeam;

				lparam = new SqlParameter("@IN_ID_Tufted", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTufted.Equals(""))
					myCommand.Parameters["@IN_ID_Tufted"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Tufted"].Value = asTufted;

				dtsSocialInsuranceProposal ldsocialInsuranceP = new dtsSocialInsuranceProposal();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsocialInsuranceP.tbSocialnsurance_Proposal);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsocialInsuranceP.EnforceConstraints = false;
				SetLogo(ldsocialInsuranceP.tbLogo);
				return ldsocialInsuranceP;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Mức nộp bổ sung BHXH'.", "SQL error message: " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "Phương Thức trong 'Mức nộp bổ sung BHXH'.", "Error message: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
        }
        public DataSet GetDataReportProvisionTermination(string asDepartment, string asTeam, string asTufted, int aiMonth, int aiYear, decimal adecRegType)
        {
            return null;
            /*SqlConnection lConnection  = GetConnection();
            try
            {
                SqlCommand myCommand = new SqlCommand("sp3s_Provision_Termination_Report", lConnection);
                myCommand.CommandType = CommandType.StoredProcedure;
                myCommand.CommandTimeout = 30000;
                myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

                SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
                myCommand.Parameters.Add(lparam);
                myCommand.Parameters["@IN_Month"].Value = aiMonth;

                lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
                myCommand.Parameters.Add(lparam);
                myCommand.Parameters["@IN_Year"].Value = aiYear;

                lparam = new SqlParameter("@IN_Regulation_Type", SqlDbType.Decimal, 15);
                myCommand.Parameters.Add(lparam);
                myCommand.Parameters["@IN_Regulation_Type"].Value = adecRegType;

                lparam = new SqlParameter("@IN_ID_Department", SqlDbType.NVarChar, 3000);
                myCommand.Parameters.Add(lparam);
                if(asDepartment.Equals(""))
                    myCommand.Parameters["@IN_ID_Department"].Value = DBNull.Value;
                else
                    myCommand.Parameters["@IN_ID_Department"].Value = asDepartment;

                lparam = new SqlParameter("@IN_ID_Team", SqlDbType.NVarChar, 3000);
                myCommand.Parameters.Add(lparam);
                if(asTeam.Equals(""))
                    myCommand.Parameters["@IN_ID_Team"].Value = System.DBNull.Value;
                else
                    myCommand.Parameters["@IN_ID_Team"].Value = asTeam;
				
                lparam = new SqlParameter("@IN_ID_Tufted", SqlDbType.NVarChar, 3000);
                myCommand.Parameters.Add(lparam);
                if(asTufted.Equals(""))
                    myCommand.Parameters["@IN_ID_Tufted"].Value = DBNull.Value;
                else
                    myCommand.Parameters["@IN_ID_Tufted"].Value = asTufted;

                dtsProvisionTermination ldsPT = new dtsProvisionTermination();
                SqlDataAdapter adap = new SqlDataAdapter(myCommand);
                adap.Fill(ldsPT.tbProvisionTermination);
                lConnection.Close();
                myCommand.Dispose();
                adap.Dispose();
                ldsPT.EnforceConstraints = false;
                SetLogo(ldsPT.tbLogo);
                return ldsPT;
            }
            catch (SqlException ex)
            {
                Ctrl_LOG.Print("General controller", "In GetDataReportSISickLeave method.", "SQL error message: " + ex.Message);
                lConnection.Close();
                return null;
            }
            catch(Exception ex)
            {
                Ctrl_LOG.Print("General controller", "In GetDataReportSISickLeave method.", "Error message: " + ex.Message);
                lConnection.Close();
                return null;
            }*/
        }
        public DataSet GetDataReportProvisionTermination01(string asDepartment, string asTeam, string asTufted, int aiFromMonth, int aiMonth, int aiFromYear, int aiYear, decimal adecRegType)
        {
            return null;
            /*SqlConnection lConnection  = GetConnection();
            try
            {
                SqlCommand myCommand = new SqlCommand("sp3s_Provision_Termination01_Report", lConnection);
                myCommand.CommandType = CommandType.StoredProcedure;
                myCommand.CommandTimeout = 30000;
                myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;
				
                SqlParameter lparam = new SqlParameter("@IN_FromMonth", SqlDbType.Int, 4);
                myCommand.Parameters.Add(lparam);
                myCommand.Parameters["@IN_FromMonth"].Value = aiFromMonth;

                lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
                myCommand.Parameters.Add(lparam);
                myCommand.Parameters["@IN_Month"].Value = aiMonth;
				
                lparam = new SqlParameter("@IN_FromYear", SqlDbType.Int, 4);
                myCommand.Parameters.Add(lparam);
                myCommand.Parameters["@IN_FromYear"].Value = aiFromYear;

                lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
                myCommand.Parameters.Add(lparam);
                myCommand.Parameters["@IN_Year"].Value = aiYear;

                lparam = new SqlParameter("@IN_Regulation_Type", SqlDbType.Decimal, 15);
                myCommand.Parameters.Add(lparam);
                myCommand.Parameters["@IN_Regulation_Type"].Value = adecRegType;

                lparam = new SqlParameter("@IN_ID_Department", SqlDbType.NVarChar, 3000);
                myCommand.Parameters.Add(lparam);
                if(asDepartment.Equals(""))
                    myCommand.Parameters["@IN_ID_Department"].Value = DBNull.Value;
                else
                    myCommand.Parameters["@IN_ID_Department"].Value = asDepartment;

                lparam = new SqlParameter("@IN_ID_Team", SqlDbType.NVarChar, 3000);
                myCommand.Parameters.Add(lparam);
                if(asTeam.Equals(""))
                    myCommand.Parameters["@IN_ID_Team"].Value = System.DBNull.Value;
                else
                    myCommand.Parameters["@IN_ID_Team"].Value = asTeam;
				
                lparam = new SqlParameter("@IN_ID_Tufted", SqlDbType.NVarChar, 3000);
                myCommand.Parameters.Add(lparam);
                if(asTufted.Equals(""))
                    myCommand.Parameters["@IN_ID_Tufted"].Value = DBNull.Value;
                else
                    myCommand.Parameters["@IN_ID_Tufted"].Value = asTufted;

                dtsProvisionTermination01 ldsPT01 = new dtsProvisionTermination01();
                SqlDataAdapter adap = new SqlDataAdapter(myCommand);
                adap.Fill(ldsPT01.tbProvisionTermination01);
                lConnection.Close();
                myCommand.Dispose();
                adap.Dispose();
                ldsPT01.EnforceConstraints = false;
                SetLogo(ldsPT01.tbLogo);
                return ldsPT01;
            }
            catch (SqlException ex)
            {
                Ctrl_LOG.Print("General controller", "In GetDataReportSISickLeave method.", "SQL error message: " + ex.Message);
                lConnection.Close();
                return null;
            }
            catch(Exception ex)
            {
                Ctrl_LOG.Print("General controller", "In GetDataReportSISickLeave method.", "Error message: " + ex.Message);
                lConnection.Close();
                return null;
            }*/
        }
        public DataSet GetDataReportSIGeneral(string asArea, string asCCCode, int aiQuarter, int aiYear)
        {
            return null;
            /*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("dbo.sp3s_Social_Insurance_General_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Quarter", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Quarter"].Value = aiQuarter;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@IN_Area_Code", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asArea.Equals(""))
					myCommand.Parameters["@IN_Area_Code"].Value = DBNull.Value;
				else
					myCommand.Parameters["@IN_Area_Code"].Value = asArea;

				lparam = new SqlParameter("@IN_Cost_Center_Code", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asCCCode.Equals(""))
					myCommand.Parameters["@IN_Cost_Center_Code"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_Cost_Center_Code"].Value = asCCCode;

				dtsSocialInsurance_General ldsReport = new dtsSocialInsurance_General();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsReport, "tbSocialInsurance_General");
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsReport.EnforceConstraints = false;
				return ldsReport;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "In GetDataReportSIGeneral method.", "SQL error message: " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "In GetDataReportSIGeneral method.", "Error message: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
        }
        public DataSet GetDataReportSIC45(string asDepartment, string asTeam, string asTufted, int aiMonth, int aiYear, int aiRatio)
        {
            return null;
            /*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_SocialInsurance_List_Employee_And_Salary_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Month"].Value = aiMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@IN_ID_Department", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asDepartment.Equals(""))
					myCommand.Parameters["@IN_ID_Department"].Value = DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Department"].Value = asDepartment;

				lparam = new SqlParameter("@IN_ID_Team", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTeam.Equals(""))
					myCommand.Parameters["@IN_ID_Team"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Team"].Value = asTeam;
				
				lparam = new SqlParameter("@IN_ID_Tufted", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTufted.Equals(""))
					myCommand.Parameters["@IN_ID_Tufted"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Tufted"].Value = asTufted;

				lparam = new SqlParameter("@IN_Ratio", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Ratio"].Value = aiRatio;

				dtsSocialInsurance_List_Employee_And_Salary ldsReport = new dtsSocialInsurance_List_Employee_And_Salary();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsReport.tbSocialnsurance_List_Employee_And_Salary);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsReport.EnforceConstraints = false;
				SetLogo(ldsReport.tbLogo);
				return ldsReport;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "In GetDataReportSIC45 method.", "SQL error message: " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "In GetDataReportSIC45 method.", "Error message: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
        }
        public DataSet GetDataReportSIC46(string asDepartment, string asTeam, string asTufted, decimal dMonth1, decimal dMonth2, decimal dMonth3, int aiQuarter, int aiYear, int aiRatio)
        {
            return null;
            /*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_SocialInsurance_Compare_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_Quarter", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Quarter"].Value = aiQuarter;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@IN_Month1", SqlDbType.Decimal,28);
				myCommand.Parameters.Add(lparam);
				if(dMonth1.Equals(""))
					myCommand.Parameters["@IN_Month1"].Value = DBNull.Value;
				else
					myCommand.Parameters["@IN_Month1"].Value = dMonth1;

				
				lparam = new SqlParameter("@IN_Month2", SqlDbType.Decimal,28);
				myCommand.Parameters.Add(lparam);
				if(dMonth2.Equals(""))
					myCommand.Parameters["@IN_Month2"].Value = DBNull.Value;
				else
					myCommand.Parameters["@IN_Month2"].Value = dMonth2;
				
				
				lparam = new SqlParameter("@IN_Month3", SqlDbType.Decimal,28);
				myCommand.Parameters.Add(lparam);
				if(dMonth3.Equals(""))
					myCommand.Parameters["@IN_Month3"].Value = DBNull.Value;
				else
					myCommand.Parameters["@IN_Month3"].Value = dMonth3;

				lparam = new SqlParameter("@IN_ID_Department", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asDepartment.Equals(""))
					myCommand.Parameters["@IN_ID_Department"].Value = DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Department"].Value = asDepartment;

				lparam = new SqlParameter("@IN_ID_Team", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTeam.Equals(""))
					myCommand.Parameters["@IN_ID_Team"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Team"].Value = asTeam;

				lparam = new SqlParameter("@IN_ID_Tufted", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asTufted.Equals(""))
					myCommand.Parameters["@IN_ID_Tufted"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_ID_Tufted"].Value = asTufted;

				lparam = new SqlParameter("@IN_Ratio", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Ratio"].Value = aiRatio;

				dtsSocialInsurance_Compare ldsReportSIC46 = new dtsSocialInsurance_Compare();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsReportSIC46.tbSocialInsurance_Compare);
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsReportSIC46.EnforceConstraints = false;
				SetLogo(ldsReportSIC46.tbLogo);
				return ldsReportSIC46;
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "In GetDataReportSIC46 method.", "SQL error message: " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "In GetDataReportSIC46 method.", "Error message: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
        }
        public DataSet GetDataReportTradeUnionList(string asArea, string asCCCode, string asOrgUnit, string asEmpCode, int aiMonth, int aiToMonth, int aiYear)
        {
            return null;
            /*SqlConnection lConnection  = GetConnection();
			try
			{
				SqlCommand myCommand = new SqlCommand("sp3s_Trade_Union_List_Report", lConnection);
				myCommand.CommandType = CommandType.StoredProcedure;
				myCommand.CommandTimeout = 30000;
				myCommand.UpdatedRowSource = UpdateRowSource.OutputParameters;

				SqlParameter lparam = new SqlParameter("@IN_From_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_From_Month"].Value = aiMonth;
				
				lparam = new SqlParameter("@IN_To_Month", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_To_Month"].Value = aiToMonth;

				lparam = new SqlParameter("@IN_Year", SqlDbType.Int, 4);
				myCommand.Parameters.Add(lparam);
				myCommand.Parameters["@IN_Year"].Value = aiYear;

				lparam = new SqlParameter("@IN_Area_Code", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asArea.Equals(""))
					myCommand.Parameters["@IN_Area_Code"].Value = DBNull.Value;
				else
					myCommand.Parameters["@IN_Area_Code"].Value = asArea;

				lparam = new SqlParameter("@IN_Cost_Center_Code", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asCCCode.Equals(""))
					myCommand.Parameters["@IN_Cost_Center_Code"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_Cost_Center_Code"].Value = asCCCode;

				lparam = new SqlParameter("@IN_Org_Unit", SqlDbType.NVarChar, 3000);
				myCommand.Parameters.Add(lparam);
				if(asOrgUnit.Equals(""))
					myCommand.Parameters["@IN_Org_Unit"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_Org_Unit"].Value = asOrgUnit;

				lparam = new SqlParameter("@IN_Employee_Code", SqlDbType.NVarChar, 20);
				myCommand.Parameters.Add(lparam);
				if(asEmpCode.Equals(""))
					myCommand.Parameters["@IN_Employee_Code"].Value = System.DBNull.Value;
				else
					myCommand.Parameters["@IN_Employee_Code"].Value = asEmpCode;

				dtsTradeUnionList ldsReport = new dtsTradeUnionList();
				SqlDataAdapter adap = new SqlDataAdapter(myCommand);
				adap.Fill(ldsReport, "tbTradeUnionList");
				lConnection.Close();
				myCommand.Dispose();
				adap.Dispose();
				ldsReport.EnforceConstraints = false;
				return ldsReport;/*
			}
			catch (SqlException ex)
			{
				Ctrl_LOG.Print("General controller", "In GetDataReportTradeUnionList method.", "SQL error message: " + ex.Message);
				lConnection.Close();
				return null;
			}
			catch(Exception ex)
			{
				Ctrl_LOG.Print("General controller", "In GetDataReportTradeUnionList method.", "Error message: " + ex.Message);
				lConnection.Close();
				return null;
			}*/
        }
        #endregion

        private void SetLogo(DataTable adtLogo)
        {
            //////////////////////////////////////////
            FileStream fs = File.OpenRead(Application.StartupPath + @"\ICons\Logo.bmp");

            int length = (int)fs.Length;
            byte[] image = new byte[length];
            fs.Read(image, 0, length);
            DataRow row = adtLogo.NewRow();
            row["Logo"] = image; // Setting image
            adtLogo.Rows.Add(row);
            //////////////////////////////////////////
        }

        public string PareQuote(string asString )
		{
			if(asString.Equals("")) return "";

			string lsString = String.Empty;
			lsString = asString.Trim().Replace("'","");

			lsString = lsString.Replace(",", "','");
			lsString = lsString.Replace(" '","'");
			return "'"+lsString.Replace("' ","'")+"'";
		}

		public bool IsNumber(string asString)
		{
			try
			{
				Convert.ToInt32(asString);
				return true;
			}
			catch
			{
				return false;
			}
		}
		public bool IsDouble(string asString)
		{
			try
			{
				Convert.ToDouble(asString);
				return true;
			}
			catch
			{
				return false;
			}
		}

        public void SetDBNull(DataRow dr)
        {
            for (int i = 0; i < dr.ItemArray.Length; i++)
            {
                if (dr[i].ToString().Equals("")) dr[i] = DBNull.Value;
            }
        }

        #region SetImage
        //Get Image file and Set to PictureBox
        public Bitmap SetImage(string asPath)
        {
            if (File.Exists(asPath))
            {
                return new Bitmap(asPath);

            }
            else return null;
        }
        #endregion

        #region CImg2Byte
        public object CImg2Byte(Image image)
        {
            if (image == null) return null;
            MemoryStream ms = new MemoryStream();
            image.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp);
            return ms.ToArray();
        }
        #endregion

        #region GetAvatar
        public Image GetAvatar(Byte[] byteHinh)
        {
            return Image.FromStream(new MemoryStream(byteHinh));
        }
        #endregion

    }
}
